MegaApiClient
MegaApiClient copied to clipboard
retrieve thumbnail uri but do not download
Description:
I would like to just receive the thumbnail url but not actually have to download it. Is that possible at all? I couldn't find any method to do that.
MegaApiClient Version: 1.10.2
Hello,
There is no public method in MegaApiClient to retrieve only the thumbnail URL because it simply doesn't exist. When requesting the thumbnail, MegaApiClient receives a blob of encrypted data and needs to extract/decrypt its content to get the actual image: https://github.com/gpailler/MegaApiClient/blob/master/MegaApiClient/MegaApiClient.cs#L964-L1024
Hey @gpailler thanks for the response. When looking at https://github.com/gpailler/MegaApiClient/blob/master/MegaApiClient/MegaApiClient.cs#L993 so downloadResponse.Url is not the url of the image right? It's a url where the blob data comes from?
Yes correct. It's not the thumbnail itself but a handle + blob size + blob content. The blob content is the thumbnail but encrypted
Is there a way to generate the url in some other way? I wasn't even able to reverse engineer the path where the image gets loaded from in the browser version of mega.nz :/ i'm building a sortof crawling tool and i don't want to have to download the thumbnails on the server side just to send them to the clients if i can avoid the traffic this causes
The url with the thumbnail content already decrypted just doesn't exist. As you can see in the DownloadFileAttribute method, the thumbnail is decrypted in memory.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.