Skip to content

Commit

Permalink
Merge pull request #49 from connectattoo/feature/disable-image-upload…
Browse files Browse the repository at this point in the history
…-size

CT-32/CT-157
  • Loading branch information
natanaelsc authored Jun 18, 2024
2 parents 75f6446 + 6dc864c commit d1024d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/profile/dto/update-image.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { HttpStatus, ParseFilePipeBuilder } from '@nestjs/common';

export const UpdateImageDTO = new ParseFilePipeBuilder()
.addFileTypeValidator({ fileType: `^(image/jpeg|image/png)$` })
/* limite de upload de imagem desabilitado temporariamente
.addMaxSizeValidator({
maxSize: 1048576, // 1MB
message: 'File size is too large',
})
*/
.build({
fileIsRequired: true,
errorHttpStatusCode: HttpStatus.UNPROCESSABLE_ENTITY,
Expand Down

0 comments on commit d1024d4

Please sign in to comment.