When uploading the picture, the files object that form.parse called back to inside is an empty object, asking the Great God for advice.

  node.js, question

I don’t know what will cause files to be empty. fields has a value of {upload:’ test. png’}. test.png is the picture I uploaded. Please help me look at it. I am very grateful.

var form = new formidable.IncomingForm();
 form.parse(request, function (error, fields, files){
 fs.renameSync(files.upload.path, 'temp/test.png');
 response.writeHead(200,{'Content-Type': 'text/html'});
 response.end('<img src="/show">');


There may be something you need in this post, and I have also encountered such a problem.