From 8fd45bbee41c557db29748ddd65345734a18762d Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 8 Apr 2018 17:23:24 +0300 Subject: [PATCH] Use CHUNK_SIZE. --- aiogram/types/input_file.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiogram/types/input_file.py b/aiogram/types/input_file.py index 9b510b09..aaf0bf86 100644 --- a/aiogram/types/input_file.py +++ b/aiogram/types/input_file.py @@ -82,7 +82,7 @@ class InputFile(base.TelegramObject): return self.file @classmethod - async def from_url(cls, url, filename=None, chunk_size=65536): + async def from_url(cls, url, filename=None, chunk_size=CHUNK_SIZE): """ Download file from URL @@ -117,7 +117,7 @@ class InputFile(base.TelegramObject): log.debug(f"File successful downloaded at {round(time.time() - start, 2)} seconds from '{url}'") return cls(file, filename, conf=conf) - def save(self, filename, chunk_size=65536): + def save(self, filename, chunk_size=CHUNK_SIZE): """ Write file to disk