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

Could the trailing slash be added to "location" while navigating folders? #1546

Closed
yarikoptic opened this issue Mar 21, 2023 · 3 comments
Closed
Assignees

Comments

@yarikoptic
Copy link
Member

Could trailing slash (or url encoded %2F) be added to the location= option in URLs while navigating file tree? E.g. instead of https://dandiarchive.org/dandiset/000026/draft/files?location=derivatives%2FEPIC%2Fsub-EXC022 having https://dandiarchive.org/dandiset/000026/draft/files?location=derivatives%2FEPIC%2Fsub-EXC022%2F when getting to that folder?

The rationale: in dandi-cli, to not guess on either we are to deal with an asset or a folder we disambiguate with that trailing /. It used to be that Web ui had it and then users could simply cut/paste folder URL from the browser. Since some time (not noticed when) web UI stopped adding that final / and it broke that simple workflow of "cut/paste url into dandi download".

Ref: dandi/dandi-cli#1256

@jjnesbitt
Copy link
Member

I'll just point out that the location parameter always refers to a folder, and can never be used to refer to an asset, so I don't understand the issue you're dealing with. Regardless, it seems that there's also some inconsistencies with trailing slashes in the GUI itself, and if it doesn't break anything downstream, I have no issue always adding a trailing slash.

@jjnesbitt jjnesbitt self-assigned this Mar 21, 2023
@waxlamp
Copy link
Member

waxlamp commented Jun 15, 2023

ping @yarikoptic

yarikoptic added a commit to dandi/dandi-cli that referenced this issue Jun 15, 2023
jwodder pushed a commit to dandi/dandi-cli that referenced this issue Jun 15, 2023
@yarikoptic
Copy link
Member Author

ok, we are adjusting dandi-cli code to hardcode the knowledge that location in that URL (but not in dandi:// urls which we also have) could point only to a folder: dandi/dandi-cli#1305. Thank you @AlmightyYakob for pointing that out! I will leave it up to you either to add the final / to exemplify that fact, and to close this issue one way or another.

yarikoptic added a commit to dandi/dandi-cli that referenced this issue Oct 20, 2023
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

3 participants