Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download file doesn't work #78

Open
limassolsk opened this issue Apr 20, 2023 · 4 comments
Open

download file doesn't work #78

limassolsk opened this issue Apr 20, 2023 · 4 comments

Comments

@limassolsk
Copy link

limassolsk commented Apr 20, 2023

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
Copy link
Collaborator

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

@limassolsk
Copy link
Author

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
Copy link
Collaborator

@limassolsk
Copy link
Author

limassolsk commented Apr 20, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants