Validating size and extensions
Basic rules for file validation.
new ParseFilePipe({
validators: [
new MaxFileSizeValidator({ maxSize: 2 * 1024 * 1024 }),
new FileTypeValidator({ fileType: /png|jpeg/ }),
],
}),Last updated
Basic rules for file validation.
new ParseFilePipe({
validators: [
new MaxFileSizeValidator({ maxSize: 2 * 1024 * 1024 }),
new FileTypeValidator({ fileType: /png|jpeg/ }),
],
}),Last updated