Closed Thiti-Dev closed 3 years ago
Hi, try not to use the @Type (() => Array) decorator on an array of files.
@dmitriy-nz
Ahh It was my fault, I tested this with postman and I forget to set the form-data field to be an array And yeah type casting isn't needed
Now everything works fine
Thank you
Glad I helped you! In any case, an error should have been thrown when checking @IsFiles(). I will check it 😉
The decorators such as HasMimeType, MaxFileSize . . . only works for Single image file -> @IsFile
But when I tried with the @isFiles -> {Array of FileSystemStoreFile} with {each:true} -> no matter what the mime or size is it will be always valid without getting the validation error