mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +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()
|
||||
result.save(buffer, 'JPEG', progressive=True, **kwargs)
|
||||
buffer.seek(0)
|
||||
buffer.name = getattr(file, 'name', None)
|
||||
buffer.name = 'a.jpg'
|
||||
return buffer
|
||||
except IOError:
|
||||
return file
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# Versions should comply with PEP440.
|
||||
# This line is parsed in setup.py:
|
||||
__version__ = '1.32.0'
|
||||
__version__ = '1.32.1'
|
||||
|
|
Loading…
Reference in New Issue
Block a user