Allow users to open files using external viewers
@yarikoptic pointed out that DANDI (https://about.dandiarchive.org/) maintains a registry of external file viewers, and allows users to open files using these viewers. e.g.:
@yarikoptic's notes are below:
the most up to date registry:
https://github.com/dandi/dandi-archive/blob/552912a15b69dc39844b787632ef892ab27fe7a2/web/src/views/FileBrowserView/FileBrowser.vue#L327
with examples e.g. on
just click "open with"
And we have a similar one at datasets.datalad.org click e.g. on dots at https://datasets.datalad.org/?dir=/dbic/QA/sub-emmet/ses-20180531/anat
And I started to think about it long ago with possibly more ideas at https://github.com/con/external-services somewhere
We should consider doing the same!
When attempting to view an example file in https://neurosift.app/nwb?url=https://physionet.org/files/bigp3bci/1.0.0/LICENSE.txt, we get CORS errors
https://neurosift.app/nwb?url=https://physionet.org/files/bigp3bci/1.0.0/LICENSE.txt
Note from @yarikoptic
here is the doc with some initial thoughts on yaml structure to encapsulate the list of external viewers
https://github.com/dandi/dandiarchive-legacy/wiki/WiP:-dump-of-thoughts-on-%22services-registry%22
Yep, I agree, files that are public should have Access-Control-Allow-Origin (as lightwave does.)
Unfortunately although that's a simple change, it's not simple to do that at this very moment because the file storage stuff is in flux.
We could add CORS to our public Amazon S3 resources, I think!
FWIW, here is our CORS TF definitions for dandi: https://github.com/dandi/dandi-infrastructure/pull/124/files#diff-06069f8dbb172bb001a61ad262a45ea856829f4a9993f3b7a2bb5ae91a6701feL26 . Note that we also enable for HEAD requests (had a dedicated request https://github.com/dandi/dandi-archive/issues/1641 )