mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Allow uploading files up to 2000 MiB in size
This commit is contained in:
parent
2adc01be7f
commit
c196b90c9d
1 changed files with 2 additions and 2 deletions
|
|
@ -1772,8 +1772,8 @@ class Client(Methods, BaseClient):
|
||||||
if file_size == 0:
|
if file_size == 0:
|
||||||
raise ValueError("File size equals to 0 B")
|
raise ValueError("File size equals to 0 B")
|
||||||
|
|
||||||
if file_size > 1500 * 1024 * 1024:
|
if file_size > 2000 * 1024 * 1024:
|
||||||
raise ValueError("Telegram doesn't support uploading files bigger than 1500 MiB")
|
raise ValueError("Telegram doesn't support uploading files bigger than 2000 MiB")
|
||||||
|
|
||||||
file_total_parts = int(math.ceil(file_size / part_size))
|
file_total_parts = int(math.ceil(file_size / part_size))
|
||||||
is_big = True if file_size > 10 * 1024 * 1024 else False
|
is_big = True if file_size > 10 * 1024 * 1024 else False
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue