# 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)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024