feat(media): primary media storage, growth goals, retention and delivery tools
CI / build (push) Has been cancelled
CI / build (push) Has been cancelled
Event photos and videos are now stored only on the NFS/local share named in Settings -> Media storage. Uploads, photo editing, video processing and the per-event filing step refuse to run until that share is configured and writable, so nothing is silently written inside the container. Video originals, renditions, posters and sidecars share one folder on the share. Also adds volunteer growth goals with a mentor queue, an admin retention and storage sweep with a cron entry point, cached gallery thumbnails with per-folder ZIP downloads, a server-rendered booth-sheet PDF, and in-app confirm/release for every upcoming assignment. Service reminders now ignore the one-off event reminder rule, which had been queueing an extra bogus reminder for each published service. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
+6
-4
@@ -15,7 +15,9 @@ import { signInAs, resetDb, BASE } from "./dev";
|
||||
const execFileAsync = promisify(execFile);
|
||||
const ARCHIVE_ROOT = process.env.ARCHIVE_DIR ?? "/tmp/glenloch-e2e-archive";
|
||||
const ARCHIVE_FOLDER = "E2E Video Archive";
|
||||
const UPLOAD_DIR = process.env.UPLOAD_DIR ?? "/tmp/glenloch-e2e-uploads";
|
||||
// Originals and every derivative live on the configured share, never in the
|
||||
// app container's upload volume.
|
||||
const MEDIA_ROOT = path.join(ARCHIVE_ROOT, ARCHIVE_FOLDER);
|
||||
const SAMPLE = "/tmp/glenloch-e2e-media-sample.mp4";
|
||||
|
||||
// A real 32×24 JPEG, so the media page renders a normal browser image.
|
||||
@@ -211,7 +213,7 @@ test.describe("media library and video sharing", () => {
|
||||
expect(trimmed.video.embedCode).toContain(`/embed/${videoId}`);
|
||||
|
||||
const webPath = path.join(
|
||||
UPLOAD_DIR,
|
||||
MEDIA_ROOT,
|
||||
"videos",
|
||||
eventId,
|
||||
videoId,
|
||||
@@ -236,7 +238,7 @@ test.describe("media library and video sharing", () => {
|
||||
|
||||
// A 720p upload gets a smaller 480p sibling for slow connections.
|
||||
const lowPath = path.join(
|
||||
UPLOAD_DIR,
|
||||
MEDIA_ROOT,
|
||||
"videos",
|
||||
eventId,
|
||||
videoId,
|
||||
@@ -322,7 +324,7 @@ test.describe("media library and video sharing", () => {
|
||||
|
||||
await expect(access(nfsOriginal)).rejects.toThrow();
|
||||
await expect(
|
||||
access(path.join(UPLOAD_DIR, "videos", eventId)),
|
||||
access(path.join(MEDIA_ROOT, "videos", eventId)),
|
||||
).rejects.toThrow();
|
||||
const gone = await fetch(`${BASE}/watch/${videoId}`);
|
||||
expect(gone.status).toBe(404);
|
||||
|
||||
Reference in New Issue
Block a user