Closed mslw closed 10 months ago
Thanks @mslw. Will work a fix into the next release.
Another manifestation: if the URL happens to be a local (e.g. network or unc path) that starts with /
(or \
), the download button would still be offered, but point to the catalog website root (my browser still tried to interpret that, and to create a file with proper name but spurious content).
This got fixed by #343
The catalog schema allows two types for
file.url
, array and string:https://github.com/datalad/datalad-catalog/blob/f612cb100fd1d222b3317a5300e610d894020580/datalad_catalog/schema/jsonschema_file.json#L34-L41
However, if the URL is given as string, the download URL is abbreviated to the first letter (in examples, I am using
datalad catalog serve
on localhost):"url": ["https://example.com/file1.dat"]
produces a link to https://example.com/file1.dat (correct)"url": "https://example.com/file5.dat"
produces a link to http://127.0.0.1:8000/h (incorrect)For metadata and config that I used, see this gist.