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

Support skylinks with optional paths #7

Open
2 of 6 tasks
MSevey opened this issue Mar 22, 2021 · 0 comments
Open
2 of 6 tasks

Support skylinks with optional paths #7

MSevey opened this issue Mar 22, 2021 · 0 comments

Comments

@MSevey
Copy link
Contributor

MSevey commented Mar 22, 2021

Issue by m-cat
Wednesday Sep 09, 2020 at 11:03 GMT
Originally opened as NebulousLabs/skynet-docs#34


Skylink with path

It looks like skynet-js doesn't support downloading from a skylink with a path appended (!). Any given path will be chopped off. I want to fix this and use the skylink as given, preserving path elements and query parameters.

Additional path parameter

I also want to add an optional path parameter. The difference would be that skylink is used as-is while the path parameter we would URI-encode e.g. the user could have a filename containing ?. We can't URI-encode skylink because it might contain query parameters we don't want to encode (and it could already be encoded). The path parameter lets users be able to pass in their filenames and paths without worrying about encoding (which they shouldn't have to think about) or manually appending to their skylinks.

The path parameter should accept an array of path elements, each of which gets URI-encoded and joined to form the full path. We can't take a full path like dir1/dir2/foo because the / character itself gets URI-encoded.

Checklist

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

No branches or pull requests

1 participant