API REMOVE/CANCEL #128
Unanswered
JellySheep
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to do loading files through api, but faced a trouble - when I canceled downloading it couldn't start again for the same file - for eg i'm trying to download file_1.mkv, download starts, then i cancel it. After that if i try to download file_1.mkv, download will not start, my logs look like:
INFO: 192.168.x.1:64709 - "POST /download/{tg_id}/{chanel_id}/{message_id}/3540?name={name} HTTP/1.1" 200 OK
INFO: 192.168.x.1:64709 - "GET /queue/{tg_id} HTTP/1.1" 200 OK
But there is not any file in temp folder and my web for api gives 500 code.
I tried to check it manually with console:
tg-stack/api# curl -c cookies.txt -X POST "http://192.168.x.2:8081/{tg_id}/file/toggle-pause-download" -H "Content-Type: application/json" -d '{"fileId": 3540, "isPaused": false}'
{"error":"File is downloading"}
So telegram-files in different ways says - file is loading, but temp folder is empty and file was deleted by "cancel" and I can't start a new loading cause of:
tg-stack/api# curl -c cookies.txt -X POST "http://192.168.x.2:8081/{tg_id}/file/start-download" -H "Content-Type: application/json" -d '{
"chatId": {chanel_id},
"messageId": {message_id},
"fileId": 3540
}'
{"error":"File is downloading"}
But any other file will be loaded as it should, I repeated it several times and it always was like this.
I tried to find some information about cancel/remove in api, but I couldn't. Also remove did not work for me:
curl -b cookies.txt -c cookies.txt -X POST "http://192.168.x.2:8081/{tg_id}/file/remove"
-H "Content-Type: application/json"
-d '{"fileId": 1387}'
{"error":null}
Maybe there is some advice or it is a bug, and I should not use api like this?
My setup is docker tg-downloader: image: ghcr.io/jarvis2f/telegram-files:latest
Beta Was this translation helpful? Give feedback.
All reactions