[Offline Apps] Offline file upload without using outsystems now

[Offline Apps] Offline file upload without using outsystems now

  
Forge Component
(25)
Published on 2015-11-19 by OutSystems Labs
25 votes
Published on 2015-11-19 by OutSystems Labs
We're got a simple offline app working correctly in browser;  we're now trying to extend functionality to allow file uploads when offline - we've seen this working in the inspections app via the outsystems now mobile app - is it possible to deliver this via browser?

Thanks, Jason
Hello Jason, 

are you talking about the pictures that you can take on Inspections?
Yes, that's exactly right Pedro - we're trying to enable offline file uploads outside of the outsystems now app.
Hello Jason,
 
The file upload that you have in Inspections is not actually a file upload. The component that takes care of the pictures sets the base64 data of the picture in a hidden input. After that, the base64 is sent to the server just like any other data in the Offline Apps component.
 
If I understand you correctly, you're trying to build a feature through which your users will be able to upload a file, even if they're offline, is that correct? Can you please describe the use case a little bit more? I would like to understand why your users need to “upload” a file if they’re offline. My 2 cents on this: the user as the file and no connection, you can ask for the file as soon as the user gets online again and you’re about to upload the data.
 
Anyway, and if you really need to move forward with this, the only options that I’m seeing as doable, is to use the JavaScript File API; see a great example here. The support for it is also quite good.
 
I believe that building this will not be an easy task, but drop a note if you need any help.
 
Cheers
Pedro Cardoso
Hi Pedro, our use case here is field inspections - we want to enable users to upload several pictures whilst offline (can't guarantee connectivity) and then for these to be written to the db when they're next connected.  They might take up to 20 pictures between online syncs and we want to avoid them having to browse through their gallery etc. to choose the right images.

I'll review the js file api, thanks for the heads up, but are we saying that outsystems now is the way to achieve this without having to produce new code?

Cheers, Jason
Yes Jason. If you're able to use OutSystems Now, you have it already built. Remember that OutSystems Now is open source so you can tweak its look & feel to whatever you need.

Cheers