Answers for "flask get uploaded file size"

0

flask get uploaded file size

# If using disk :
request.files['file'].save("/tmp/foo")
size = os.stat("/tmp/foo").st_size
# If not using disk : 
blob = request.files['file'].read()
size = len(blob)
Posted by: Guest on June-23-2021

Code answers related to "flask get uploaded file size"

Python Answers by Framework

Browse Popular Code Answers by Language