This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user