不知道有哪些情況會導(dǎo)致files為空,fields有值,值為{upload:'test.png'},test.png就是我上傳的那張圖片,請大家?guī)臀铱纯?,不甚感激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('');});
上傳圖片時, form.parse回調(diào)里的files對象是個空對象 ,求大神指點(diǎn)
慕哥6287543
2019-04-14 11:28:33