mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Fix resize if needed not seeking back for image = bytes
This commit is contained in:
parent
85be48f42b
commit
c0828f590f
|
@ -39,7 +39,7 @@ def _resize_photo_if_needed(
|
|||
or (isinstance(file, io.IOBase) and not file.seekable())):
|
||||
return file
|
||||
|
||||
before = file.tell() if isinstance(file, io.IOBase) else None
|
||||
before = file.tell() if isinstance(file, io.IOBase) else 0
|
||||
if isinstance(file, bytes):
|
||||
file = io.BytesIO(file)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user