How to get file upload status in Flask

I need to add some sort of download progress dialog to my application. I know that there are many Flash / Java / HTML5 solutions for this, however they are not suitable in my case.

The checkbox documentation provides an “easier solution” offering the Flask-Uploads extension. However, I did not find any solution for my question.

Is it possible to get the file upload status (i.e. the number of bytes already downloaded)?

In fact, I know that Flask accumulates file data in memory if the file size is small. Otherwise, it saves the file in a temporary folder. If there are no parameters for getting the number of bytes received, maybe there are ways to get the temp file name at least?

Any tricks are welcome.

Thanks for the help!

+5
source share
2 answers

I do not think this is due to Flask

Please view this link:

I think it will be useful

request.META['REMOTE_ADDR'], request.GET['X-Progress-ID']
+1
source

I still need to check this out, but I found a link to something similar here

0
source

All Articles