-
Notifications
You must be signed in to change notification settings - Fork 12
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
"Open in browser" on dataset_description.json results in Download request #2027
Comments
I am not sure there's anything for us to do here. For me:
In other words, this seems like something the user would have to configure (through plugins and settings) in order to add browser-level handling for JSON files. The quantum leap would be for us to create our own in-DANDI JSON viewer but that seems very out of scope. Let me know what you think. |
TL;DR: it is due to encodingFormat we (dandi-cli or user via API) uploaded in metadata for the assets. In dandi-cli we rely now on https://docs.python.org/3/library/mimetypes.html to guess and provide mime type within encodingFormat. In newer dandisets all is good for those .json files: e.g. going to https://dandiarchive.org/dandiset/000874/draft/files?location= I can view those jsons file and in metadata record encodingFormat says json. So the question now on what to do to fixup metadata records for other jsons already in the archive? e.g. could a simple script be written which goes and fixups all metadata records where path points to .json file and has encodingFormat that or could/should we provide in-code fixup... faster to be done than said: some explorationso in Brave it prompts for download instead of just showing the file. Ideally it would just open/show that .json. I don't know why it doesn't -- that is something to investigate and possibly address... may be it is because of redirected to URL does not say that it is context type json but rather
I felt we had related issue and the closest I found was and apparently that is the |
I think this is the way. Let me look into it. |
@yarikoptic I think this is now fixed (the example in the issue description now properly renders the JSON content in my browser). I'll close this issue but please re-open if there are lingering issues. |
on https://dandiarchive.org/dandiset/000108/draft/files?location= clicking on the .json file which could be easily visualized by browser leads to download.
References:
The text was updated successfully, but these errors were encountered: