Replies: 1 comment 5 replies
-
You won't get these parameters for the local file type, Coz we are talking about a file in the cloud. When a local file is being uploaded to telegram cloud servers, telegram will assign some default parameters (unique_file_id, big file id, small file id, etc. ) to the uploaded ones. According to these parameters, the telegram has indexed the files in the cloud. As I said earlier, a unique thing in a particular file in different chats is the one and only 'unique_file_id available in the file attributes. So we cant consider file_name, file_caption, etc. for indexing a chat. That's why this bot makes a list with the same. It can be considered to provide a report of the process after the operation. Updates will be pushed in the future... |
Beta Was this translation helpful? Give feedback.
-
This is a continuation of #3. What exactly is unique_file_id? I searched on the internet but I could not find anything relevant. I guess these values are some sort of checksums. How TG obtains these ids from the files uploaded? A user could generate these values for local files?
If 2 files are identical but have different names, one is named Introduction to Python.pdf, and the other one is named 145536456.pdf, a problem could arrive if the bot deletes the one named correctly and keep the other. How this could be prevented?
Maybe the bot could delete the file containing only numbers and keep the one containing words?
Or keeping the file that has a caption?
Or adding an option so that users choose manually what to delete?
It would be helpful if a list of duplicates (with the name, caption, and size of files) could be dumped in a text file locally or sent to Saved Messages, so the users have an idea of what has been deleted.
In the above scenario, after the purge, I would not find the file Introduction to Python.pdf, but I could check the list of duplicates and found the corresponding duplicate named 145536456.pdf
Beta Was this translation helpful? Give feedback.
All reactions