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: ##
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.