fohrloop / dash-uploader

The alternative upload component for python Dash applications.
MIT License
141 stars 29 forks source link

Consider migrating from resumable.js to something else #21

Closed fohrloop closed 2 years ago

fohrloop commented 3 years ago

From https://github.com/23/resumable.js/issues/533 seems that resumable.js not maintained anymore. Flow.js if a fork of resumable.js, which has added functionality and seems to be actively maintained. The latest version of resumable.js on npm (1.1.0) is from Nov 2017, and latest version of flow.js on npm (2.14.1) is from June 2020.

There could be also some other interesting options.

I am open to suggestions, if anyone knows better than me what is out there.

sorenwacker commented 3 years ago

It sounds very reasonable to me. There is also https://www.dropzonejs.com/ and https://github.com/pqina/filepond. Personally, I am more interested in large batch compatibility than image previews and editability.

Though in general moving on from something that is not maintained anymore will be necessary at some point anyway.

Uppy also seems worthwhile looking at as described in this article. It can also get files from Dropbox/Google Drive, maybe a bit out of scope though.

fohrloop commented 3 years ago

I started a branch for v.0.5.0 which might contain some bigger changes. This is a candidate issue on it. So, if someone wants to experiment using some other library than resumable.js, better starting point (than master branch) would be https://github.com/np-8/dash-uploader/tree/0.5.0

fohrloop commented 3 years ago

Thanks for the tips, @soerendip 🙏

I had time to look a bit around. I also agree with you, and think that the top priorities for dash-uploader JS component would be

  1. Ability to upload large files in small chunks. This is the selling point and reason dash-uploader exists.
  2. Ability to upload many files at once. This is a feature request already on dash-uploader (https://github.com/np-8/dash-uploader/issues/20) and resumable.js seems to have a bug related to this. Preferably, user could just drag & drop a folder.
  3. Robustness. The upload component must be robust for example when there are problems in internet connection.
  4. Well documented API & easy to integrate with React
  5. Fair amount of user / developer base & some recent commits

Points 1-3 are needed from the user perspective, points 4 is a developer-friendliness points and point 5 guarantees that the solution will last for some time.

Some thoughts on different options

Summary

At first glance, looks like filepond and flow.js are strong candidates here. Perhaps also Plupload. These should be tested for (1) the ability to upload directory structures and (2) how they handle interrupts in the internet connection.

Am I missing something else here?

fohrloop commented 3 years ago

If anyone has expertise & time to check if any of the candidates (flow.js, filepond, Plupload, Meteor-Files, or others) meet the requirements -especially, uploading a folder full of files, it would be a great help. After that dash-uploader could start migration process.

fohrloop commented 3 years ago

Started a branch for flow.js. One of the first things should be to check if there is issue when uploading more than 100 files, as mentioned in github.com/flowjs/flow.js/issues #89.

sorenwacker commented 3 years ago

Seems all essential components are working in the FlowJS branch of my pull request. The last thing to add would be automatic tests. But, I am not sure how to do that. The test in the repo is actually not testing anything yet. But manual testing worked.

That was a great learning experience.

sorenwacker commented 3 years ago

Also, after the tests are added, we could clean up the code? There are still left overs from the resumable.js in there.

sorenwacker commented 3 years ago

The code was updated to the latest Dash version. So, it will not be compatible with older versions due to the different imports. E.g.

from dash import html
fohrloop commented 2 years ago

I think this issue can be closed as the consideration is done. Next step is to finish the flow.js implementation in the flow-dev branch.