metacatui icon indicating copy to clipboard operation
metacatui copied to clipboard

Public Read Access Policy Causes weird download behavior

Open vchendrix opened this issue 7 years ago • 0 comments

See https://github.com/NCEAS/metacat/issues/4 for a detailed discussion of this issue

Metacat UI: latest from master Metacat Version: 2.8.5

Metacat has some weird behavior when downloading datasets when the accessPolicy contains public,read.

  • /v2/object/<id>: The behavior should download the entire package but instead only the Resource Map file is downloaded.
  • if /v2/packages/application%2Fbagit-097/<id> is accessed the name of the Zip file should be <Dataset Title>.zip but instead it is urn_uuid_<id>.zip. While this is not a show stopper it is not very user friendly.

Examples The download link in the Metacat UI uses /v2/object<id>. See a public example https://data-dev.ess-dive.lbl.gov/catalog/d1/mn/v2/object/ess-dive.1.rdf

This one will name the zip file zip.zip https://data-dev.ess-dive.lbl.gov/catalog/d1/mn/v2/packages/application%2Fbagit-097/ess-dive.1.rdf

I have demonstrated on my local environment that if public read access policy is removed the behavior is to download <Datset title>.zip. WRT /v2/object/<id> if the object does not contain public read the behavior is to download the entire package as if the packages API was requested.

vchendrix avatar Jan 29 '18 21:01 vchendrix