feat(boxstore): add one-time download retention mode
Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.feat(boxstore): add one-time download retention mode Introduce a `one-time` retention option and persist it on the manifest as `one_time_download`. One-time download boxes bypass retention expiry scheduling, force zip downloads, and reject download attempts until all files are complete to prevent partial retrievals.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const boxPanel = document.querySelector(".box-panel[data-box-id]");
|
||||
const boxStatus = document.querySelector(".box-statusbar span:first-child");
|
||||
const zipOnly = boxPanel && boxPanel.dataset.zipOnly === "true";
|
||||
|
||||
document.querySelectorAll('.box-file[aria-disabled="true"]').forEach((item) => {
|
||||
item.addEventListener("click", (event) => {
|
||||
@@ -27,7 +28,7 @@ function updateBoxFile(file) {
|
||||
item.dataset.status = file.status;
|
||||
item.title = file.title;
|
||||
|
||||
if (isComplete) {
|
||||
if (isComplete && !zipOnly) {
|
||||
item.href = file.download_path;
|
||||
item.setAttribute("download", "");
|
||||
item.removeAttribute("aria-disabled");
|
||||
|
||||
Reference in New Issue
Block a user