Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Support skylinks with optional paths #34

Open
2 of 6 tasks
mrcnski opened this issue Sep 9, 2020 · 0 comments
Open
2 of 6 tasks

Support skylinks with optional paths #34

mrcnski opened this issue Sep 9, 2020 · 0 comments
Assignees

Comments

@mrcnski
Copy link

mrcnski commented Sep 9, 2020

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant