File downloaded path as HTTP URL

0
Hi, I need to download and provide the file path to my custom widget as below http://<hostname>:<port>/Data/Parent/Parent.pdf http://<hostname>:<port>/Data/Parent/Child1/Child1.pdf http://<hostname>:<port>/Data/Parent/Child1/Child11.pdf http://<hostname>:<port>/Data/Parent/Child2/Child2.pdf http://<hostname>:<port>/Data/Parent/Child2/Child21.pdf Parent and Child structure should be maintained because the client API expects the data in that format and the file path has to be given as HTTP URL so there is no exception to this format. I have successfully tested the client API by manually creating the folder structure under <PROJECT_ROOT>/theme folder and copying the files to this folder. I want to know during runtime, how dynamically download the files to a  folder location which Mendix app recognizes as HTTP URL path.  I am looking for a generic approach that should work without any issues on both on-premise and cloud. One way I am thinking to implement this behavior is to write external REST service and deploy it to Web application server. I  want to know any ideas to implement this within Mendix ?
asked
1 answers
0

For a close approximation of your URL format, you could look at using a Deeplink to serve the PDF. If you “Use String Argument” in the Deeplink, you can use this as a path. This gets passed as a single string to your deeplink microflow. You will have you write your own logic to translate this to generate the correct PDF, but once done you can pass this to a “Download file” action to return the PDF as a download for the user.

answered