From 1bc651958c7a8bf19efdb3f0e1d04921d8329da1 Mon Sep 17 00:00:00 2001 From: lenafx Date: Fri, 12 Dec 2025 16:34:19 +0100 Subject: [PATCH] pfp size limit to 50mb --- server.js | 5 ++++- src/api/user/user.routes.ts | 4 ++-- views/users.html | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/server.js b/server.js index 62ec328..c5356cf 100644 --- a/server.js +++ b/server.js @@ -1,4 +1,7 @@ -const fastify = require('fastify')({ logger: true }); +const fastify = require('fastify')({ + logger: { level: 'error' }, +}); + const path = require('path'); const jwt = require("jsonwebtoken"); const { initHeadless } = require("./dist/shared/headless"); diff --git a/src/api/user/user.routes.ts b/src/api/user/user.routes.ts index 4d769e4..7dfed67 100644 --- a/src/api/user/user.routes.ts +++ b/src/api/user/user.routes.ts @@ -5,9 +5,9 @@ async function userRoutes(fastify: FastifyInstance) { fastify.get('/me',controller.getMe); fastify.post("/login", controller.login); fastify.get('/users', controller.getAllUsers); - fastify.post('/users', controller.createUser); + fastify.post('/users', { bodyLimit: 1024 * 1024 * 50 }, controller.createUser); fastify.get('/users/:id', controller.getUser); - fastify.put('/users/:id', controller.updateUser); + fastify.put('/users/:id', { bodyLimit: 1024 * 1024 * 50 }, controller.updateUser); fastify.delete('/users/:id', controller.deleteUser); fastify.get('/users/:id/integration', controller.getIntegrationStatus); fastify.delete('/users/:id/integration', controller.disconnectAniList); diff --git a/views/users.html b/views/users.html index 29dd043..da13032 100644 --- a/views/users.html +++ b/views/users.html @@ -71,7 +71,7 @@

Click to upload or drag and drop

-

PNG, JPG up to 5MB

+

PNG, JPG, GIF... up to 50 MB