codingjoe/django-s3file

Upload Progress Output

Closed this issue · 6 comments

Hi, thank you for creating this middleware, it works great :)

I'm currently using this to upload large files to s3 via the UI (upwards of a couple GB). I see there was some sort of support for using a progress bar in a previous version of this plugin that was removed here #60
Is there any other sort of way in the current version to get upload progress? Right now I'm currently just exposing a div img that shows a loading gif indicator (not ideal) when the form submission occurs and the upload is progressing.

FWIW I'm not super familiar with JS and event listeners etc.. I've looked through the JS that is being executed behind the scenes but I only see one possible variable that I could maybe hook into to get some progress, window.uploading (I may be overlooking something else)? And I'm not even sure if that will help me exactly.

If you have any pointers or suggestions on how to show the client the progress of the upload - I would greatly appreciate it.

Thanks,
Phil

@schwartzmx thanks for reaching out. I agree, that would be a great feature.
I would love if you could draft a solution. To get some inspiration, I would suggest to check out the documentation on XMLHttpRequest.upload.
The progress signal should give provide you with the information you are seeking. What might be tricky is, that there might be multiple uploads running at the same time.

I am not a JS magician myself, but I am sure we can find people willing to help implement and review this.

This would be extremely useful for me as well! Thanks

@jwill490 I agree, you are welcome to help :)

hi @schwartzmx sorry, but I had some time today, so I implemented the progress events myself.
I would really appreciate some feedback from your side. Let me know if this fits your purpose.
I for your feedback before I release the new feature.

Thanks again for all the effort. You really helped craft this feature.
Best
-joe

looks good @codingjoe , haven't had a chance to test it but I think this will work perfectly. Thanks!

Perfect, I will need one more week to release a new version. I want to release one more feature.