Hello friends
How can I get photoCached?
I want to have a preview of the pictures before downloading.
Perhaps these are the tasks of the library.
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1get_file.html
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1file_type_photo.html
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1get_file_extension.html
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1get_file_mime_type.html
https://core.telegram.org/tdlib/docs/classtd_1_1td__api_1_1delete_file.html
Let's wait for professionals.
Each photo has a lot of sizes. You need to call downloadFile for the smallest photo size if you want to guarantee that it is available. In most cases for photos this request succeeds immediately without any network request and you receive information about downloaded file through updateFile.
I agree with Leo. This is a library task and it is wrapped in a common file uploading mechanism.
Most helpful comment
Each photo has a lot of sizes. You need to call downloadFile for the smallest photo size if you want to guarantee that it is available. In most cases for photos this request succeeds immediately without any network request and you receive information about downloaded file through updateFile.