53
Views
2
Comments
[ResumableJS] Upload files stored in Mobile local storage
resumablejs
Reactive icon
Forge asset by Vincent Koning
Application Type
Mobile

Hello,

I'm working on a mobile application that works offline and saves data/files to local storage, once the user upload/sync these data to the server's database, so I'm managing to utilize ResumableJS to upload these files in chunks.
I already converted the plugin to Mobile App and it's working fine.


Can you guide me how to add the files from local storage instead of reading them from the browser?

2020-09-21 08-42-47
Vincent Koning

Hi Sherif,

This is not a question I can answer since this goes beyond the scope of this component. I'm using the functionality that is provided by default by ResumableJS. As far as I know there is no logic to communicate with Local Storage nor is there logic to provide a binary blob to ResumableJS. 

I would recommend you to contact the original authors of ResumableJS here: https://github.com/23/resumable.js
They can guide you to a possible solution.

I do however wonder if you are using the correct tool for the job at hand. As stated by the original ResumableJS team your use-case is probably not why they created the tool. You can find the following snippet at the bottom of the home page of ResumableJS: http://resumablejs.com/

They state that this tool is using the HTML5 file features and not the Local Storage. Its main goal is uploading large files (several GB in size) and I'm not sure if that is your use-case since you are working from a mobile device. 

If you do want to use ResumableJS and find a solution to your problem then please let me know how you implemented it. I love to learn something new.

Greetings,

Vincent

2021-01-15 16-58-19
Sherif Diab

Hi Vincent,

Thanks for your clarification and your efforts to build such component.

I really want to utilize the resumable uploading features to sync the local storage files based on the chunks upload and managing the failures and network cut. Not to start the whole process if we got any network failure (it will not be a GIGAs files but it will touch the 100MB files)

So, i assume that i can use the uploading functionality it self from the plugin, and the challenge will be in mapping between the local storage binaries and ResumableFile object using "AddFiles" method.


Anyways, i will do my best to find a solution in this plugin, and if you have any suggestion or other plugin, please inform me.


Thanks,

Sherif Diab

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.