Skip to content
New issue

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

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

Already on GitHub? # to your account

[Feature Request] Add ability to import a public uri link to account #137

Open
sabihoshi opened this issue Mar 22, 2020 · 5 comments
Open

Comments

@sabihoshi
Copy link

I would like to request for the ability to import a public uri into an account.
I've been trying to do it on my own, but I am really lost on how to do it.

@gpailler
Copy link
Owner

gpailler commented Apr 4, 2020

What do you mean by 'import a public uri'? You can download a file from a public URI with the following code:

var client = new MegaApiClient();
client.LoginAnonymous();
Uri fileLink = new Uri("https://mega.nz/#!qngU0SLb!LKpljv7WtAT-Z0k4IuLwgby7g4OBhOFiBVzIkylD_iY");
INodeInfo node = client.GetNodeFromLink(fileLink);
client.DownloadFile(fileLink, node.Name);
client.Logout();

The new URI format is not supported yet but it will be fixed in the next release (cf #138)

@sabihoshi
Copy link
Author

Downloads are different from imports, imports are transferring a public shared folder into your account. It basically acts as transferring those files into your cloud, as akin to downloading it then re-uploading it, this takes just seconds to do.

@gpailler
Copy link
Owner

gpailler commented Apr 4, 2020

Ok thanks for the details. It's definitely a feature request!

@ptrsuder
Copy link

I managed to add this functionality to my fork but it's so messy haha. Feel free to take a look tho.

@gpailler
Copy link
Owner

@ptrsuder Do you think you can provide a PR ?
Thanks 🙏

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@gpailler @ptrsuder @sabihoshi and others