tdlight-team / tdlight-telegram-bot-api

The TDLight Telegram Bot API is an actively enhanced fork of the original Bot API, featuring experimental user support, proxies, unlimited files size, and more.
https://t.me/TDLight
Boost Software License 1.0
128 stars 27 forks source link

download file doesn't work #78

Open limassolsk opened 1 year ago

limassolsk commented 1 year ago

docker run -p 8081:8081 --env TELEGRAM_API_ID=123 --env TELEGRAM_API_HASH=xyz --env TELEGRAM_ALLOW_USERS=1 --name tdlight tdlight/tdlightbotapi

steps: http://127.0.0.1:8081/user{token}/getuserprofilephotos?user_id=123 -> {"file_id":"xyz"} http://127.0.0.1:8081/user{token}/getFile?file_id=xyz -> {"file_path":"photos/file_0.jpg"} http://127.0.0.1:8081/file/user{token}/photos/file_0.jpg ->{"ok":false,"error_code":404,"description":"Not Found"}

if i attache to container by command docker exec -it tdlight /bin/ash

I can see file /var/lib/telegram-bot-api/123:xyz/photos/file_0.jpg

how to download file by file_path?

giuseppeM99 commented 1 year ago

@limassolsk files are not served by the botapi, you need yo setup a proxy (eg with nginx)

limassolsk commented 1 year ago

you need yo setup a proxy (eg with nginx)

how to do it with docker? why no information about docker image doesn't work with files?

giuseppeM99 commented 1 year ago

@limassolsk See https://github.com/MarcoBuster/tdlight-telegram-bot-api-traefik

limassolsk commented 1 year ago

more easy is to change in README.md:

Installation The simplest way to use it is with this docker command:

by adding -v /var/lib/telegram-bot-api/:/var/lib/telegram-bot-api/ and add somewhere that /file/ - doesn't work.