feat: add download button to Pi videos list

- /api/local-video/file?download=1 serves file as attachment
- Download link (green DL button) added to each row in local-videos.js
- Dashcam USB files skipped: no persistent mount for direct serve;
  use Import then download from Pi Videos

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 02:17:29 -04:00
co-authored by Copilot
parent b711d421cc
commit cc6e9c8de0
2 changed files with 18 additions and 1 deletions
+7
View File
@@ -188,6 +188,13 @@
actionsDiv.appendChild(convertButton);
}
const downloadLink = document.createElement("a");
downloadLink.href = `/api/local-video/file?path=${encodeURIComponent(file.path)}&download=1`;
downloadLink.className = "btn btn-sm btn-outline-success btn-icon-mobile";
downloadLink.download = file.path.split("/").pop();
downloadLink.innerHTML = '<i class="fas fa-download"></i><span class="btn-label"> DL</span>';
actionsDiv.appendChild(downloadLink);
const deleteButton = document.createElement("button");
deleteButton.type = "button";
deleteButton.className = "btn btn-sm btn-outline-danger btn-icon-mobile";