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.
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 changedclear_metadata
to pass it aBytesIO
object, with no filename, instead of a file.