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
+3 -3
View File
@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
import { db } from "@/lib/db";
import { uploadFile } from "@/lib/storage";
import { uploadToHetzner } from "@/lib/storage";
import { ShotPriority } from "@prisma/client";
import { z } from "zod";
@@ -169,8 +169,8 @@ export async function POST(req: NextRequest) {
);
}
const buffer = Buffer.from(await thumbnailFile.arrayBuffer());
const result = await uploadFile(buffer, thumbnailFile.name, thumbnailFile.type, "image");
thumbnailUrl = result.url;
const { key: thumbKey } = await uploadToHetzner(buffer, thumbnailFile.name, thumbnailFile.type, "image");
thumbnailUrl = `/api/files/${thumbKey}`;
}
// Resolve shot group