How to Save File To Network Folder From Mobile App on WiFi

How to Save File To Network Folder From Mobile App on WiFi

  

Hi!  My first posting...  New to this platform.  May be a bit lost.  I am looking for a plugin to save a picture I have taken on my phone directly to a shared folder on my local network.  The phone is connected to the network via WiFi and I can access the folder without any problems form other computers\devices.

What plugin can I use to save the binary file to the network shared folder?

Thanks in advance for your help!

Any ideas?

Hi Med, this is how I would do it, but there is probably another way too.


https://www.outsystems.com/forge/component/32/sftp/

https://www.outsystems.com/forge/component/59/extension-ftpwebrequest/


Download the FTP or SFTP component from forge (links above)  and reference it in your app.  Then create a server action that will ftp files to your local server when wi-fi is available. If you cannot reference the ftp extension in a mobile action you will have to create a public action inside a web app on the same environment and then reference that public action in your mobile app.


On your mobile app take the picture with the camera plugin and then use the action above to FTP the file to your server. 


I have done it before using this method so I am pretty sure it will work.


Let me know if it works.

Thanks for the suggestion.  It looks like first I have to save the image to local storage and then move the file to its final destination.  This is the first app I try building using this platform so even remedial things like this are a challenge at this time.  I will let you know how it goes.

Thanks for the help!

I would recommend File Transfer plugin, this plugin and a sample app is available in the Forge.

Kind regards,

Matthias

Hi Vonnelize and Matthias!

Thank you for pointing me in the right direction.  As a newbie, it is often challenging to figure out even the most basic of things.  Perhaps reviewing the tutorials would facilitate the process, but what's the fun in that.

Rather than using the SFTP approach, I am trying to use the File Transfer Plugin.  It is more in line with the functionality I am looking for.  However, I run into a problem.  I cannot find any documentation on how to reference the Server on the network.  On Windows, we use "\\ServerName\EmpPics" or should it be "smb://ServerName/EmpPics"?

When I run the app I built on my Android Phone, it errors out saying "Upload failed with error code:0".  I ran the sample app on the same phone and it works.  The difference is that the sample is moving the file to\from a Rest service, not a network path.

If this only works with Rest services, then I will have to use the FTP option.  Any suggestions?