feat(community): Bild-Upload-Limit 5MB → 10MB

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
chahinebrini 2026-05-30 01:09:47 +02:00
parent 38811820e6
commit 6d59bfd62b

View File

@ -22,10 +22,10 @@ export default defineEventHandler(async (event) => {
const ext = contentType === "image/png" ? "png" : "jpg"; const ext = contentType === "image/png" ? "png" : "jpg";
const base64 = match[2]; const base64 = match[2];
// Max 5MB check // Max 10MB check
const sizeBytes = Math.ceil((base64.length * 3) / 4); const sizeBytes = Math.ceil((base64.length * 3) / 4);
if (sizeBytes > 5 * 1024 * 1024) { if (sizeBytes > 10 * 1024 * 1024) {
throw createError({ statusCode: 400, message: "Bild zu groß (max 5MB)" }); throw createError({ statusCode: 400, message: "Bild zu groß (max 10MB)" });
} }
const binaryStr = atob(base64); const binaryStr = atob(base64);