Open file saved in Shared folder inside mendix app

0
Hello there, I am trying to find a way to open pdf/rtf/doc/xls file saved inside a shared folder in a new browser window or in the default application using mendix.   We are using a third party API where we are passing Document index ID’s and in return they are saving document to our shared folder. I am making a call to the API using a microflow on click of a button.  Now on the same microflow, I need to open saved document preferably on new browser window. I did some research and  read about some modules such as DeepLink and URLRedirector etc., but it seems they need document to be open of type FileDocument defined inside mendix application.  Any inputs/help will be highly appreciated. Thank you.
asked
3 answers
0

Following is the Microflow that is getting called on click of a grid row, which is showing list of documents shown by a non persistent entity pulling list of document (name and bunch of id’s from an external database) using a .Net web service.

 

The dilemma I have is how can I open the saved document on the browser side because I am not dealing with a System.FileDocument entity here, which is required by DownLoadFile activity.

 

 

 

 

 

 

answered
0

Accomplished this by consuming a .Net web API that we created to open file.

answered
0

How is the data being returned?

For example, if it’s Base64 encoded you can use the Community Commons module to call Base64DecodeToFile, and that will give you a FileDocument you can use to download the file.

If you know the file name and location already, you can use Community Commons GetFileContentsFromResource action to get the FileDocument.

There are a number of methods in Community Commons that can help with file handling, so if the above don’t work, you may find another method that does.

https://appstore.home.mendix.com/link/app/170/

Good luck
 

answered