FEAT: add svg

This commit is contained in:
marcos-silva-rodrigues
2025-01-30 16:06:13 -03:00
parent db78494b1a
commit 867aec092b
2 changed files with 11 additions and 4 deletions
+2 -2
View File
@@ -95,10 +95,10 @@ export class ThemeController {
}
private validMimeType(file: Express.Multer.File) {
const mimeTypesValid = ['image/jpeg', 'image/jpg', 'image/png'];
const mimeTypesValid = ['image/jpeg', 'image/jpg', 'image/png', 'image/svg+xml'];
if (file && !mimeTypesValid.includes(file.mimetype)) {
throw new HttpException(`O Arquivo ${file.fieldname} deve ser jpeg, jpg ou png`, HttpStatus.BAD_REQUEST);
throw new HttpException(`O Arquivo ${file.fieldname} deve ser jpeg, jpg, png ou svg`, HttpStatus.BAD_REQUEST);
}
}