Nekmo / telegram-upload

Upload and download files from Telegram up to 4 GiB using your account
MIT License
1.09k stars 237 forks source link

Thumbnail gets auto deleted #128

Closed JohnCale47 closed 2 years ago

JohnCale47 commented 3 years ago

Im Uploading a whole directory , after uploading one file from it the thumbnail automatically deletes from my pc, then it throws the thumbnail path not found error cause the thumbnail is not there..

Nekmo commented 3 years ago

Captures are automatically deleted after uploading the file. What is the error?

JohnCale47 commented 3 years ago

thumbnail file path not found.. i need all files from that directory to hav that thumbnail in telegram, but instead 1 file uploads and thumbnail file gets deleted from pc and whole upload gets cancelled

Nekmo commented 3 years ago

I need to reproduce the bug, thanks!

tissole commented 3 years ago

Happened to me too on Windows 10, I tried to upload a folder with 3 videos and an image using the command telegram-upload --to me --directories recursive "D:\album" --thumbnail-file "D:\album\cover.jpg" Only the first video is uploaded and then the script stops with the error:

[Error] telegram-upload Exception: TelegramInvalidFile: D:\album\cover.jpg thumbnail file does not exists.

The thumbnail is deleted from the folder.

Pip freeze cffi==1.14.6 click==8.0.1 colorama==0.4.4 cryptg==0.2.post4 hachoir==3.1.2 pyaes==1.6.1 pyasn1==0.4.8 pycparser==2.20 rsa==4.7.2 telegram-upload==0.4.0 Telethon==1.23.0

Nekmo commented 2 years ago

Uploaded two videos with thumbnains without errors:

telegram-upload /home/xxxxxxxx/t_video5794143716776085444.mp4 /home/xxxxxxxx/cFwgRXlxNTozt4kuQm9@@hd.mp4
Uploading "t_video5794143716776085444.mp4"
Uploading "cFwgRXlxNTozt4kuQm9@@hd.mp4"

(upload finished without errors)

Nekmo commented 2 years ago

Bug reproduced using the thumbnail-file parameter:

telegram-upload --thumbnail-file /tmp/7479120.jpg /home/xxxxxxxxx/t_video5794143716776085444.mp4 /home/xxxxxxxxx/cFwgRXlxNTozt4kuQm9@@hd.mp4
Uploading "t_video5794143716776085444.mp4"
[Error] telegram-upload Exception:
TelegramInvalidFile: /tmp/7479120.jpg thumbnail file does not exists.

Thanks @tissole !

Nekmo commented 2 years ago

Fixed in release v0.5.1.