feat(community): Bild-Upload-Limit 5MB → 10MB
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
38811820e6
commit
6d59bfd62b
@ -22,10 +22,10 @@ export default defineEventHandler(async (event) => {
|
||||
const ext = contentType === "image/png" ? "png" : "jpg";
|
||||
const base64 = match[2];
|
||||
|
||||
// Max 5MB check
|
||||
// Max 10MB check
|
||||
const sizeBytes = Math.ceil((base64.length * 3) / 4);
|
||||
if (sizeBytes > 5 * 1024 * 1024) {
|
||||
throw createError({ statusCode: 400, message: "Bild zu groß (max 5MB)" });
|
||||
if (sizeBytes > 10 * 1024 * 1024) {
|
||||
throw createError({ statusCode: 400, message: "Bild zu groß (max 10MB)" });
|
||||
}
|
||||
|
||||
const binaryStr = atob(base64);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user