上传图片时, form.parse回调里的files对象是个空对象 ,求大神指点

不知道有哪些情况会导致files为空,fields有值,值为{upload:'test.png'},test.png就是我上传的那张图片,请大家帮我看看,不甚感激
varform=newformidable.IncomingForm();
form.parse(request,function(error,fields,files){
console.log(files);
fs.renameSync(files.upload.path,'temp/test.png');
response.writeHead(200,{'Content-Type':'text/html'});
response.end('');
});
慕哥6287543
浏览 1148回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript