You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Skylink with path
It looks like skynet-js doesn't support downloading from a
skylinkwith a path appended (!). Any given path will be chopped off. I want to fix this and use theskylinkas given, preserving path elements and query parameters.Additional path parameter
I also want to add an optional
pathparameter. The difference would be thatskylinkis used as-is while the path parameter we would URI-encode e.g. the user could have a filename containing?. We can't URI-encodeskylinkbecause it might contain query parameters we don't want to encode (and it could already be encoded). Thepathparameter 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
pathparameter 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 likedir1/dir2/foobecause the/character itself gets URI-encoded.Checklist