How can I upload files in Postman? How can I upload files in Postman? flask flask

How can I upload files in Postman?


If you wish to append a file to a postman call it needs to be added to the body.Check form-data and select file instead of text. You can now select a file with the windows file explorer.

To obtain the given file use the request package.

file = request.files['file']

The index has to be the same string you specified within the postman body data.


In my case Postman set empty first value for FileStorage object in request.files . You can check this using:

print(str(request.files))

And in case of empty index instead

file = request.files['file']

try to use

file = request.files['']