9
Views
3
Comments
File Does not download in Mobile application
Question

Hi all,

I have a backend web application and a mobile application that fetches data from the web app. I want to download a file from DB saved as a binary file. I created a blank page in the web app and added a download action. When I call this page from the mobile app, it does not download the file. In the Outsytem now app, it tries to open the pdf in RAR file opener and it does not show any PDF reader installed on my phone. When I created an apk file, installed it, and tried to download it.  It stays still. Can someone advise?


Rank: #87

You need to try Forge component

File Viewer Pulgin

File Transfer Puglin 

Rank: #55

Hi Abira,


If I understand correctly that you want to download a file in your mobile app saved in your database, you don't need to have a dummy page to download it on the Traditional Web.

You can on your mobile screen action call a server action which gets the binary data from the DB via query and returns the binary data. After that you can use, for instance, the Save File action from FilePlugin forge component to save the binary data in your device.


In order to understand how to use File Plugin forge component, there is the File Sample App forge component. 


Keep in mind that after your mobile application uses the File Plugin it will need to be regenerated and downloaded again to the phone so it can use the new plugin.


Kind Regards,
João

Rank: #86

Hello Abira,

Hope you're doing well.


Please consider this Forge component: Open PDF Sample Mobile.

Behind the scenes it uses File Plugin to save the file in the device and File Viewer Plugin to open the file. The component shows how to use and implement this logic in order to open the PDF file in a PDF Reader.


Hope that this helps you!


Kind regards,

Rui Barradas