bot.sendDocument(id, 'test.zip');
I have a 1.5GB file. But it is not sent to the user, it gives the following error:
(Unhandled rejection Error: ETELEGRAM: 413 Request Entity Too Large)
I know that the limit is 2GB, but the file is not sent. Tell me what should I do?
I only tried the above code.
2
Answers
The 2 GB is the user limit, Bot’s have an upload limit of 50 MB
So there is currently no way to exceed that limit using the Bot API.
From the
sendDocument
documenetation:Just adding to @0stone0’s answer. Bots have a file upload limit of 50 MB. If you want to bypass that you can run the Telegram Bot API server locally and host your bot over it.
If you are serving the Bot API server locally, then you’ll unlock a whole lot of new perks like
check the tdlib/telegram-bot-api repo for more info.
By the way, this is of course, of of context of node-telegram-bot-api.
Hope this helps 🙂