I'm trying to upload a bunch of attachments in my NestJS project. It's an array of multiple files and uploaded like so
@Post('/text')
async addText(@UploadedFiles() files){
console.log ("The files", files)
}
How do I ensure that the total size of the all the attachments do not exceed say 5MB? Is there a way to validate all the files?
in document has mention this validation, or you can use Multer config to validate the size in your module like this: