fix: raise upload size cap from 500 MB to 5 GB
The 500 MB cap was arbitrary. Self-hosted admins should decide based on their own disk space. Global multipart ceiling raised to 5 GB, validation cap to 5120 MB.
This commit is contained in:
@@ -224,8 +224,8 @@ export async function settingsRoutes(app: FastifyInstance): Promise<void> {
|
||||
|
||||
if (body.maxUploadSizeMb !== undefined) {
|
||||
const mb = Number(body.maxUploadSizeMb);
|
||||
if (isNaN(mb) || mb < 1 || mb > 500) {
|
||||
return reply.code(400).send({ error: 'maxUploadSizeMb must be between 1 and 500', statusCode: 400 });
|
||||
if (isNaN(mb) || mb < 1 || mb > 5120) {
|
||||
return reply.code(400).send({ error: 'maxUploadSizeMb must be between 1 and 5120', statusCode: 400 });
|
||||
}
|
||||
updateData.maxUploadSizeBytes = Math.round(mb * 1024 * 1024);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user