Aktueller Stand

This commit is contained in:
2026-01-15 23:18:42 +01:00
parent 46eae2a2a9
commit dcf45bac3d
32 changed files with 2625 additions and 395 deletions

View File

@@ -16,6 +16,7 @@ const MIME_TO_EXT: Record<string, string> = {
"image/webp": "webp",
"image/svg+xml": "svg"
};
const MAX_FILE_SIZE = 2 * 1024 * 1024;
const resolveLogoPath = (relativePath: string) => {
const absolutePath = path.join(DATA_DIR, relativePath);
@@ -51,6 +52,9 @@ export async function POST(request: Request) {
if (!extension) {
return NextResponse.json({ error: "Dateityp nicht unterstützt." }, { status: 400 });
}
if (file.size > MAX_FILE_SIZE) {
return NextResponse.json({ error: "Datei ist zu groß (max. 2 MB)." }, { status: 400 });
}
await fs.mkdir(UPLOADS_DIR, { recursive: true });