mirror of
https://github.com/TheFunny/TelegramTwitterMediaBot.git
synced 2026-10-01 00:32:05 +00:00
One MAX_UPLOAD_BYTES (10 MiB) bounded every upload, but that is the *photo* limit: Telegram's own docs say sendVideo/sendAnimation/sendDocument take up to 50 MB, and RequestEntityTooLarge is "larger than 50 MB". So a 10-50 MB video that Telegram refused to fetch by URL was refused a download too, and a video has no smaller variant — the post was lost. The non-photo cap is now MAX_MEDIA_UPLOAD_BYTES, and such a body charges the process-wide budget for the length of the preparation (one 64 MiB unit covers the cap), since PREP_SLOTS alone no longer bounds their added RAM. A const test pins both caps against Telegram's numbers.