mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Support async fd on download/upload (#1334)
This commit is contained in:
@@ -434,7 +434,10 @@ class DownloadMethods:
|
||||
try:
|
||||
async for chunk in self.iter_download(
|
||||
input_location, request_size=part_size, dc_id=dc_id):
|
||||
f.write(chunk)
|
||||
r = f.write(chunk)
|
||||
if inspect.isawaitable(r):
|
||||
await r
|
||||
|
||||
if progress_callback:
|
||||
r = progress_callback(f.tell(), file_size)
|
||||
if inspect.isawaitable(r):
|
||||
|
Reference in New Issue
Block a user