Skip to content Skip to sidebar Skip to footer

Uploading File In Python Flask

I am trying to incorporate uploading a basic text/csv file on my web app which runs flask to handle http requests. I tried to follow the baby example in flasks documentation runnin

Solution 1:

The problem is that you're passing the wrong thing to allowed_filename(). You should be passing submitted_file.filename not submitted_file itself

Solution 2:

There's a library* to handle file uploads with Flask:

https://github.com/joegasewicz/flask-file-upload

  • disclaimer - I'm the author.

Post a Comment for "Uploading File In Python Flask"