BIG MOOOOVE to Object Storage
Deploy / deploy (push) Successful in 2m43s

This commit is contained in:
twotalesanimation
2026-07-16 22:15:58 +02:00
parent 3264abb432
commit 745634f1b6
10 changed files with 594 additions and 17 deletions
+4 -3
View File
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from "next/server";
import { auth } from "@/auth";
import { db } from "@/lib/db";
import { uploadFile, uploadToHetzner, deleteFromHetzner } from "@/lib/storage";
import { uploadToHetzner, deleteFromHetzner } from "@/lib/storage";
import { recalcShotStatus } from "@/lib/shot-status";
export const maxDuration = 120;
@@ -133,8 +133,9 @@ export async function POST(
);
}
// Upload the video to the configured storage backend
const result = await uploadFile(buffer, file.name, file.type, "videos");
// Upload the video to Hetzner object storage
const { key: videoKey } = await uploadToHetzner(buffer, file.name, file.type, "videos");
const result = { url: `/api/files/${videoKey}`, key: videoKey };
// Mark all existing versions for this task as no longer latest
await db.version.updateMany({