mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 02:43:45 +03:00
Force filename with JPG extension after resizing
Old name does not matter, since we just encoded it as JPEG
This commit is contained in:
parent
308f8e8bf8
commit
ddc9bef503
|
@ -90,7 +90,7 @@ def _resize_photo_if_needed(
|
||||||
buffer = io.BytesIO()
|
buffer = io.BytesIO()
|
||||||
result.save(buffer, 'JPEG', progressive=True, **kwargs)
|
result.save(buffer, 'JPEG', progressive=True, **kwargs)
|
||||||
buffer.seek(0)
|
buffer.seek(0)
|
||||||
buffer.name = getattr(file, 'name', None)
|
buffer.name = 'a.jpg'
|
||||||
return buffer
|
return buffer
|
||||||
except IOError:
|
except IOError:
|
||||||
return file
|
return file
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Versions should comply with PEP440.
|
# Versions should comply with PEP440.
|
||||||
# This line is parsed in setup.py:
|
# This line is parsed in setup.py:
|
||||||
__version__ = '1.32.0'
|
__version__ = '1.32.1'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user