diff --git a/backend/src/entities/company-info/company-info.controller.ts b/backend/src/entities/company-info/company-info.controller.ts index dca117414..fe7007a0e 100644 --- a/backend/src/entities/company-info/company-info.controller.ts +++ b/backend/src/entities/company-info/company-info.controller.ts @@ -515,7 +515,7 @@ export class CompanyInfoController { @SlugUuid('companyId') companyId: string, @UploadedFile( new ParseFilePipeBuilder() - .addFileTypeValidator({ fileType: /image\/(png|jpeg|jpg|svg\+xml)/ }) + .addFileTypeValidator({ fileType: /image\/(png|jpeg|jpg|svg\+xml)/, skipMagicNumbersValidation: true }) .addMaxSizeValidator({ maxSize: Constants.MAX_COMPANY_LOGO_SIZE }) .build({ errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY }), ) @@ -567,7 +567,7 @@ export class CompanyInfoController { @SlugUuid('companyId') companyId: string, @UploadedFile( new ParseFilePipeBuilder() - .addFileTypeValidator({ fileType: /image\/(png|jpeg|jpg|svg\+xml)/ }) + .addFileTypeValidator({ fileType: /image\/(png|jpeg|jpg|svg\+xml)/, skipMagicNumbersValidation: true }) .addMaxSizeValidator({ maxSize: Constants.MAX_COMPANY_FAVICON_SIZE }) .build({ errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY }), )