Skip to content Skip to sidebar Skip to footer

How To Fix UploadNotAllowed Error In Flask When No File Is Uploaded?

I have a fairly basic Bootstrap form which includes a file upload, which on the backend is handled through Python, Flask, Flask-Uploads and inserted into a MongoDB database. When I

Solution 1:

Figured this one out - turns out I needed to use the following in my if statement:

if 'image' in request.form:

Rather than:

if 'image' in request.files:

Such a small thing, such a big headache!


Post a Comment for "How To Fix UploadNotAllowed Error In Flask When No File Is Uploaded?"