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

Invalid URI #138

Closed
Kuhicop opened this issue Apr 2, 2020 · 5 comments · Fixed by #141
Closed

Invalid URI #138

Kuhicop opened this issue Apr 2, 2020 · 5 comments · Fixed by #141
Assignees
Milestone

Comments

@Kuhicop
Copy link

Kuhicop commented Apr 2, 2020

Description:

Invalid uri. Unable to extract Id and Key from the uri https://mega.nz/file/qngU0SLb#LKpljv7WtAT-Z0k4IuLwgby7g4OBhOFiBVzIkylD_iY

I've tested uploading the file 3-4 times to get different link but doesn't work with any link

what are you trying to do

Download a single file from mega link

Actual Behavior:

Doesn't download anything, it says the uri is invalid

what happens

I'm getting this error: Invalid uri. Unable to extract Id and Key from the uri https://mega.nz/file/qngU0SLb#LKpljv7WtAT-Z0k4IuLwgby7g4OBhOFiBVzIkylD_iY

Expected Behavior:

Downloading the file from that url

Steps to Reproduce:

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

MegaApiClient Version: 1.7.1

@Kuhicop
Copy link
Author

Kuhicop commented Apr 2, 2020

So I guess I have to wait for the API to get updated?

@AlttiRi
Copy link

AlttiRi commented Apr 2, 2020

You can transform the link to the old format manually. (Until the fix comes out.)
For example (your link): https://mega.nz/#!qngU0SLb!LKpljv7WtAT-Z0k4IuLwgby7g4OBhOFiBVzIkylD_iY

The old format:
"https://mega.nz/#!SHARE_ID!DECRYPTION_KEY" – for a file
"https://mega.nz/#F!SHARE_ID!DECRYPTION_KEY" – for a folder
"https://mega.nz/#F!SHARE_ID!DECRYPTION_KEY?SELECTED_FILE_NODE_ID"
"https://mega.nz/#F!SHARE_ID!DECRYPTION_KEY!SELECTED_FOLDER_NODE_ID"

@gpailler gpailler self-assigned this Apr 3, 2020
@gpailler gpailler added this to the 1.7.2 milestone Apr 3, 2020
gpailler added a commit that referenced this issue Apr 3, 2020
gpailler added a commit that referenced this issue Apr 3, 2020
@gpailler
Copy link
Owner

gpailler commented Apr 3, 2020

@Kuhicop I added support for new links format. Could you try the following MyGet package https://www.myget.org/feed/megaapiclient/package/nuget/MegaApiClient/1.7.1-138-newurl-508 ?

@AlttiRi Thanks a lot for the very useful URL examples

@AlttiRi
Copy link

AlttiRi commented Apr 6, 2020

It works for me, tested via git clone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants