Merge branch 'techknowlogick-develop-patch-80718' into 'develop'

Allow files with upper case extensions when uploading avatar

See merge request funkwhale/funkwhale!1022
merge-requests/1042/head
Eliot Berriot 2020-02-02 09:11:36 +01:00
commit 031cc68375
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -219,7 +219,7 @@ class StripExifImageField(serializers.ImageField):
with io.BytesIO() as output:
image_without_exif.save(
output,
format=PIL.Image.EXTENSION[os.path.splitext(file_obj.name)[-1]],
format=PIL.Image.EXTENSION[os.path.splitext(file_obj.name)[-1].lower()],
quality=100,
)
content = output.getvalue()