datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
14 stars 12 forks source link

JS mishandles single (string) file URLs #326

Closed mslw closed 10 months ago

mslw commented 1 year ago

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):

For metadata and config that I used, see this gist.

jsheunis commented 12 months ago

Thanks @mslw. Will work a fix into the next release.

mslw commented 11 months ago

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).

mslw commented 10 months ago

This got fixed by #343