15198130
是要在 app.js 里添加:
app.use(bodyParser({ keepExtensions: true, uploadDir: './public/images' })); ?
我表单的 file 的名字为 file1,在接收请求里这样子写
router.post('/', function(req, res){
console.log(req.files.file1);
});
会报:
TypeError: Cannot read property 'file1' of undefined
请问如何实现个简单上传?谢谢!