I have a simple flask app where i am uploading single file but with file size of less than 5MB
for that i have defined
if request.content_length < 5.250e+6: ## setting upload limit to 5MB test case in my flask-app; but this is verifying the file size after uploading it; or may be i am wrong.
so is there any way to get the file size before uploading it???
Here is python solution on python+GAE, but i am new to python web framework; i know very little in flask
and this solution is based on webapp2 which is very complicated for me and also its on GAE; that is another story. so can anyone generate its
flask equivalent or any other possible way to do it in
Flask is able to limit file size while upload is in progress, see the documentation. All you need is to set
MAX_CONTENT_LENGTH when configuring your app.