To save image ,video from url in both android and ios device.

I am having url for attachment(image or video) which is uploaded on AWS S3 , is there any way so that I can download image or video from url through outsystems mobile app in both android and ios device.

Hi Divyesh,

Have you tried this plugin

https://www.outsystems.com/forge/component-overview/1606/file-viewer-plugin 

https://www.outsystems.com/forge/component-overview/1558/inappbrowser-plugin 


attached demo for both plugin

I hope this will help you.

regards

Rahul Sahu

Hello Divyesh,

You can do what you pretend using the File Transfer Plugin. This plugin will allow you to download a file through a given URL to your mobile device.

I already tested this plugin and it works for both iOS and Android devices.


https://www.outsystems.com/forge/component-overview/1409/file-transfer-plugin 


Let me know if you have any further questions.


Kind regards,

Rui Barradas

Hi Rahul ,
Thanks for answering my query.
I tried in-app browser plugin ,but that just redirects me to the url nothing else not giving any option to download.
For file viewer plugin , it redirect me to external browser where i get a popup to download or save file ,but it is no use as i want one click download , no redirection to any external browser .
May be i am doing something wrong ,I am directly fetching url to the client action , and file path i am keeping empty as it was not mandatory ,so i though it might take some default value. Please suggest me whether i am doing wrong or not.

Thanks and Regards,
Divyesh Halatwala

Hi Rui,

Thanks for your response.

I tried File Transfer Plugin, but getting error :"There was an error processing request". 

I don't now what FileSystem URL i need to put for both IOS or Android , may be because of that i am getting error.

Could you please suggest me what FileSystem Url I need to put.

Thanks and Regards,

Divyesh Halatwala

Hello Divyesh,

I don't think that error is strictly related with this plugin. Actually, that error can happen due to several causes.

Did you generate new builds after adding this plugin? Everytime you add or remove a new plugin to your application, you should generate new builds.


About your question, the FileSystemURL parameter is the path on the device where the file will be saved.

You should use something like a FilePath + FileName value.

About the FilePath, both iOS and Android devices have a different File System Layout.


Using this plugin, for Android I define the FilePath as:

$parameters.FilePath = "file:///storage/emulated/0/Download/";


For iOS I use:

$parameters.FilePath = cordova.file.documentsDirectory;


Let me know if you have any further questions.


Kind regards,

Rui Barradas