From 74cd9c0df2a4bfe3d63949378a7d031151983881 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 23 Jul 2023 17:05:28 +0900 Subject: [PATCH] Remove a usless validator --- back/src/auth/auth.controller.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/back/src/auth/auth.controller.ts b/back/src/auth/auth.controller.ts index 80ba7a0..2cd490d 100644 --- a/back/src/auth/auth.controller.ts +++ b/back/src/auth/auth.controller.ts @@ -115,16 +115,13 @@ export class AuthController { .addFileTypeValidator({ fileType: 'jpeg', }) - .addMaxSizeValidator({ - maxSize: 5000, - }) .build({ errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY, }), ) file: Express.Multer.File, ) { - const path = `/data/${req.user.id}.png`; + const path = `/data/${req.user.id}.jpg` writeFile(path, file.buffer, (err) => { if (err) throw err; });