mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Use CHUNK_SIZE.
This commit is contained in:
parent
5dacbdd2a5
commit
8fd45bbee4
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue