mirror of
https://github.com/dadosfera/maestro.git
synced 2026-10-17 04:19:08 +00:00
FEAT: add svg
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user