feat: add project bulk download and bulk video delete

Add a "Download project" / "Download selected" flow that builds a
server-side manifest of downloadable media, plus a selection mode with
bulk delete for project videos.

Gate viewer downloads behind a new project allowDownloads setting
(default off, opt-in). Admins can always download; enabling on a public
project allows anonymous visitors to download. Enforce the setting on
every download surface (manifest, version, asset, watch, video routes)
via canDownloadProjectMedia.

Add rate limits for the manifest endpoint, host allowlisting for direct
download URLs, and configurable file/byte caps.

Closes #16
Closes #19
This commit is contained in:
yusufipk
2026-06-27 13:24:05 +02:00
parent 9613c4f2c6
commit 52e4169db2
22 changed files with 1138 additions and 50 deletions
+13
View File
@@ -103,6 +103,19 @@ INVITE_CODE="your-secret-invite-code"
# Enable debug logging
# DEBUG="openframe:*"
# ============================================================================
# DOWNLOADS
# ============================================================================
# Project bulk-download manifest limits (GET /api/projects/[projectId]/download).
# Caps how many files and total known bytes a single manifest may enumerate.
OPENFRAME_PROJECT_DOWNLOAD_MAX_FILES="250"
# 20 GiB in bytes (20 * 1024 * 1024 * 1024)
OPENFRAME_PROJECT_DOWNLOAD_MAX_BYTES="21474836480"
# Comma-separated hostnames allowed for direct (non-proxied) version download URLs
# in manifests and the video page. Bunny CDN host is always allowed when configured.
# Example: "cdn.example.com,files.example.com"
NEXT_PUBLIC_DIRECT_DOWNLOAD_ALLOWED_HOSTS=""
# ============================================================================
# VIDEO PROCESSING
# ============================================================================