Telegram recently released their source for the Bot API server offers an almost identical interface as the cloud one.
The local mode of the server software allows the provider to eliminate the bot-only file size limit for upload and download, which solves the issue where users may need to transmit files larger that the existing limit.
Add options in the config file to allow users to specify their own entry points
Upload
No change is needed as uploading must go through the server program
Download
The server software, when a file is received and queried, downloads the file onto the hosting server, and requests the user to expose a separate HTTP interface to get the files.
Solution 1
Ask user to host a static HTTP server for the file
Pro:
Minimum code change
Con:
Double the disk space required when on the same server
Solution 2
Retrieve the file from a specific code path
Pro:
Save disk space when hosted on the same server
Con:
Not usable when the bot server is hosted on a separate environment
Telegram recently released their source for the Bot API server offers an almost identical interface as the cloud one. The local mode of the server software allows the provider to eliminate the bot-only file size limit for upload and download, which solves the issue where users may need to transmit files larger that the existing limit.
https://github.com/tdlib/telegram-bot-api
API change
Entry point
Add options in the config file to allow users to specify their own entry points
Upload
No change is needed as uploading must go through the server program
Download
The server software, when a file is received and queried, downloads the file onto the hosting server, and requests the user to expose a separate HTTP interface to get the files.
Solution 1
Ask user to host a static HTTP server for the file
Pro:
Con:
Solution 2
Retrieve the file from a specific code path
Pro:
Con: