Hi I am not able to understand what is wrong with below method. it is throwing unexpected field error. even I have changed many files still it is same.
@Post('upload')
@UseInterceptors(FileInterceptor('file'))
uploadFile(@UploadedFile() file: Express.Multer.File) {
console.log(file);
}
I am calling API using postman. Am I doing any mistake in postman?
it should work like below.
you are selecting file
but give some name as key
. it is blank in your case.