Asynchronous processing of file upload in Django

Viewed 2929

When you upload file with Django, the response won't be returned until the file upload has completed. If the uploaded file is large, it will take a long time, during which the user can't do anything but wait. Is there any way to implement asynchronous processing of file uploading? So, when a file is uploading backend, the user can do some other operation on the current page without interrupting the upload?

3 Answers

I am aware that it has been more that 5 years since this question was asked but I have similar problem and there are no "simple answers" on SO.

For your problem I may suggest using a progress bar (if using Django forms). Uploading a file asynchronously might not be possible in Django.

In my case the browser element is not crucial and I am considering moving the file upload from browser upload to some sort of FTP / AWS S3 file storage and working on this.

Related