Show And Tell -- Dash Resumable Upload


#1

I made a new dash upload component (https://github.com/rmarren1/dash-resumable-upload).
I found that the one in dash core components was good, but it stores the uploaded data in the component itself, which is bad news if you want to upload a very big file since it will crash the users web browser.
This one chunks the file in the front end and sends small pieces to a new endpoint that is added to to the dash app.server using an included decorator function. Then whatever data the user uploads will be in a folder in the server side, and the component will only store the names of files, which you can use to load the files from disk. It is essentially a dash wrapper for the resumable.js file uploader, so there are a lot of fun extras you can play with, like a max files uploaded setting, max file sizes, setting accepted file extensions, pausing uploads, resuming uploads, multiple simultaneous uploads, canceling uploads.

Checkout the usage.py in the repo for an idea of how it works, and check out the codepen linked to in usage.py and fork it if you want to change how it looks.

I have tested this for 1 gb files and it worked great, I hope someone finds it useful.
Best,
Ryan


Chrome crashes on uploading large files
Dash Upload Component - Decoding Large Files
Upload after confirmation and progress bar
Show and Tell - Community Thread :tada:
Show and Tell - Community Thread :tada:
#2

Wow, this is amazing! 1GB uploads!

Thanks a ton for sharing :trophy:


#3

Have you uploaded this to PyPI or do we need to install it locally?


#4

I put it up on PyPi, so you can pip install dash-resumable-upload. I’ll get more detailed documentation on github when I get a chance, but looking at usage.py and looking at src/components/Upload.py to see the properties that you can change.


#5

In case that could help anyone: If you run into problems with the pip version, see https://github.com/rmarren1/dash-resumable-upload/issues/1 for now.