标签: javascript nestjs
我在做什么错了?
@Post('upload') @UseInterceptors(FileInterceptor('file')) async upload( @UploadedFile() file) { console.log(file) }
文件为undefined
undefined
答案 0 :(得分:0)
该代码在新项目中按预期工作。因此,依赖项已损坏。删除node_modules文件夹并运行npm install可解决此问题。
node_modules
npm install