mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Fix resize if needed not seeking back for image = bytes
This commit is contained in:
@@ -39,7 +39,7 @@ def _resize_photo_if_needed(
|
|||||||
or (isinstance(file, io.IOBase) and not file.seekable())):
|
or (isinstance(file, io.IOBase) and not file.seekable())):
|
||||||
return file
|
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):
|
if isinstance(file, bytes):
|
||||||
file = io.BytesIO(file)
|
file = io.BytesIO(file)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user