Hi everyone,

I have a mobile application on Outsystems 11. I have attachment aggregate as you see below the picture and I want to preview or download the files. I found a plugin which's FileViewerPlugin. It requires "filePath". I don't know how I can find it. How can I find the path ? or If there is a better way from this plugin, please tell me. Thank you.


With this plugin you can use two ways to open the files:

 1. open files that are in your phone (file system) - for this you need to use the 'filepath'

 2. open files using a url. -  for this you need to use the 'urlFile'

For what I understand what you want is to show to the user a file that it is store in database. 

Like that you have two ways to do it:

1. Store first the file in the device using the File Plugin (https://www.outsystems.com/forge/component-overview/1633/file-plugin) with a path (for android you can store in different folder for example: 'file:///storage/emulated/0/Download/'. After use the File Tranfer Plugin using the same path to open the file. 


2. Create for example a Rest api that the only thing that do is to receive an Id (File Id) and returns the binary data.

Inside of the rest action you only need to filter the agregate and assigned the output binary data. 

Like that you can use the File Transfer Plugin using the url File. In this case it is the Rest API URL. 

Hope that this helps.