Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retrieve thumbnail uri but do not download #212

Open
schealex opened this issue Sep 9, 2022 · 6 comments
Open

retrieve thumbnail uri but do not download #212

schealex opened this issue Sep 9, 2022 · 6 comments
Labels

Comments

@schealex
Copy link

schealex commented Sep 9, 2022

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

@gpailler
Copy link
Owner

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

@schealex
Copy link
Author

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?

@gpailler
Copy link
Owner

Yes correct. It's not the thumbnail itself but a handle + blob size + blob content. The blob content is the thumbnail but encrypted

@schealex
Copy link
Author

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

@gpailler
Copy link
Owner

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.

@stale
Copy link

stale bot commented Jan 8, 2023

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.

@stale stale bot added the stale label Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@schealex @gpailler and others