At the moment when I make a POST request for the endpoint/upload, I get an incomplete search, but I have to output a file to the console.
I tried to send a request from the front (there may be a problem with the key), but nothing has changed.
Controller:
@HttpCode(200)
@Post('upload')
@UseInterceptors(
FileInterceptor('photo', {
storage: diskStorage({
destination: './uploads',
filename: (req, file, cb) => {
cb(null, `${file.originalname}`)
},
}),
})
)
uploadFile(@UploadedFile() file: Express.Multer.File) {
if (file === undefined) throw new BadRequestException('Не найдено!')
console.log(file)
}
}