Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #uploaded #file #size
ADD COMMENT
Topic
Name
3+5 =