Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Fix a ValueError when clearing image metadata #391

Closed happy-river closed 3 years ago

happy-river commented 3 years ago

Fix a regression from #371 which would sometimes cause a 500 error when uploading files, by passing the image format to PIL.Image.save. That function falls back to using the extension in the filename to figure out the image format, but #371 changed clear_metadata to pass it a BytesIO object, with no filename, instead of a file.