feat: Increase maximum image upload size from 2MB to 15MB.
All checks were successful
Deploy to Production / test (push) Successful in 40s

This commit is contained in:
syntaxbullet
2026-02-06 13:48:43 +01:00
parent b18b5fab62
commit ee088ad84b
2 changed files with 7 additions and 7 deletions

View File

@@ -471,11 +471,11 @@ export async function createWebServer(config: WebServerConfig = {}): Promise<Web
);
}
// Check file size (max 2MB)
if (buffer.byteLength > 2 * 1024 * 1024) {
// Check file size (max 15MB)
if (buffer.byteLength > 15 * 1024 * 1024) {
await itemsService.deleteItem(item.id);
return Response.json(
{ error: "Image file too large. Maximum size is 2MB." },
{ error: "Image file too large. Maximum size is 15MB." },
{ status: 400 }
);
}
@@ -666,10 +666,10 @@ export async function createWebServer(config: WebServerConfig = {}): Promise<Web
);
}
// Check file size (max 2MB)
if (buffer.byteLength > 2 * 1024 * 1024) {
// Check file size (max 15MB)
if (buffer.byteLength > 15 * 1024 * 1024) {
return Response.json(
{ error: "Image file too large. Maximum size is 2MB." },
{ error: "Image file too large. Maximum size is 15MB." },
{ status: 400 }
);
}