dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Need to enforce the ZipDownloadLimit in the access API consistently

Open landreev opened this issue 2 years ago • 0 comments

When the total dataset storage size exceeds the ZipDownloadLimit, we don't offer the "download all" option on the dataset page. Showing the message "The dataset is too large to download. Please select the files you need from the files table."

However, if the user goes directly to the download-all API (/api/access/dataset/...), the limit is not enforced when the external zipper option is enabled. I.e., the api will happily try to redirect to the zipper even if it's a terabyte-size dataset - which is almost certainly not going to work.

We need to enforce the limit there the same way as when the zipping is done internally. I'm assuming we simply forgot to add the check there. (The initial, ill-conceived plan was to allow any size multi-file downloads with the external zipper; once we realized that was a mistake, we addressed it by enforcing the limit on the dataset page level, but not in the api).

landreev avatar Aug 04 '22 20:08 landreev