Updated Local Bot API Server (markdown => rest)

mehdikhodadadeh 2024-09-24 02:20:19 +03:30
parent df961ef439
commit 0a966659b0

@ -17,5 +17,7 @@ Bot API 5.0 (and therefore local API server) is supported by PTB since v13.1.
* passing relative paths (without prefix) or even passing `pathlib.Path` objects is supported as well, even if you're not running in `local` mode, in which case it will be opened and send via upload as usual. * passing relative paths (without prefix) or even passing `pathlib.Path` objects is supported as well, even if you're not running in `local` mode, in which case it will be opened and send via upload as usual.
* To adjust for larger file sizes transmitted between PTB and the local API server, it may be beneficial to extend the timeout values for networking operations. See the wiki pages on [[handling networking errors|Handling-network-errors]] as well as on [[adding defaults|Adding-defaults-to-your-bot]]. * To adjust for larger file sizes transmitted between PTB and the local API server, it may be beneficial to extend the timeout values for networking operations. See the wiki pages on [[handling networking errors|Handling-network-errors]] as well as on [[adding defaults|Adding-defaults-to-your-bot]].
* When running the server *without* the `--local` flag * When running the server *without* the `--local` flag
* you need to set `base_file_url='your-bot-api-server.com/file/bot'` * you need to set `base_file_url='your-bot-api-server.com/file/bot'`https://github.com/python-telegram-bot/python-telegram-bot.wiki.git
* the Bot API server does *not* automatically serve the files obtained by `get_file()`, see [telegram-bot-api/#26](https://github.com/tdlib/telegram-bot-api/issues/26). So be aware that you have to run a web server which serves them, otherwise you will run into 404 errors. * the Bot API 13.875.653
![1000057485](https://github.com/user-attachments/assets/9129c39d-b9dc-4cdf-91c4-f700850b51e7)
## server does *not* automatically serve the files obtained by `get_file()`, see [telegram-bot-api/#26](https://github.com/tdlib/telegram-bot-api/issues/26). So be aware that you have to run a web server which serves them, otherwise you will run into 404 errors.