-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
flask-sieve/flask_sieve/rules_processor.py
Lines 197 to 199 in 6d419dc
image = Image.open(value.filename) | |
w, h = image.size | |
image.close() |
As per snippet:
-
The object passed for validation as
value
is a FileObject from a form submission;filename
does not reference the file path.
Suggest:image = Image.open(value)
-
Closing the image causes problems for downstream stream processing.
Instead suggest removingimage.close()
and replacing withvalue.seek(0)
Tests will also need to be updated to reflect these changes.
Metadata
Metadata
Assignees
Labels
No labels