mega.py icon indicating copy to clipboard operation
mega.py copied to clipboard

struct.error while decrypting the file_key

Open Antohnio123 opened this issue 3 years ago • 1 comments

While i did not find a way to to download a file from a public folder with one mega method, i had to do it using the code from StackOverflow: https://stackoverflow.com/questions/64488709/how-can-i-list-the-contents-of-a-mega-public-folder-by-its-shared-url-using-meg I,ve downloaded the nodes list with ids and encrypted keys of the files. But when i try to decrypt them, i get an error:

Why should we even bother with this decryptyng stuff, dealing with public folders?

Antohnio123 avatar Aug 17 '21 10:08 Antohnio123

Ooooh, i did it. I had to rewrite _download_file method and use methods of BlueGreenMagick from StackOverflow to simply download a file from public folder. By the way there is a wrong indent of the last block in _download_file. It tries to move a file before it is downloaded and released by a tempfile.NamedTemporaryFile context manager. It's better to put it otside of the CM.

Antohnio123 avatar Aug 18 '21 09:08 Antohnio123