Hi,
I am using Flask (based on Werkzeug) which uses Python.
So the user can download a file, I'm using the send_from_directory
function: http://flask.pocoo.org/docs/api/?highlight=send_from_directory#flask.send_from_directory
However when actually downloading the file, the HTTP header content-length
is not set. So the user has no idea how big the file being downloaded is.
I can use os.path.getsize(FILE_LOCATION)
in Python to get the file size (in bytes), but cannot find a way to set the content-length
header in Flask.
Any ideas?