From 35a8ac820f084271bc7591834096226639aec0d4 Mon Sep 17 00:00:00 2001 From: Meier Lukas Date: Mon, 13 Oct 2025 23:52:05 +0200 Subject: [PATCH] fix(users): profile picture upload limit wrong (#4276) --- packages/api/src/router/user.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/api/src/router/user.ts b/packages/api/src/router/user.ts index 8ee07b62e..ebb0b432b 100644 --- a/packages/api/src/router/user.ts +++ b/packages/api/src/router/user.ts @@ -114,11 +114,10 @@ export const userRouter = createTRPCRouter({ .input( z.object({ userId: z.string(), - // Max image size of 256KB, only png and jpeg are allowed image: z .string() .regex(/^data:image\/(png|jpeg|gif|webp);base64,[A-Za-z0-9/+]+=*$/g) - .max(262144) + .max(350000) // approximately 256KB in base64 (256 * 1024 * 4 / 3 + prefixes) .nullable(), }), )