代码
form.parse(request, function(error, fields, files) {
console.log('parsing done');
fs.renameSync(files.upload.path, 'c:/tmp/test.png');
response.writeHead(200, {'Content-Type': 'text/html'});
response.write('received image:<br/>');
response.write('<img src="/show" />');
response.end();
});
异常信息
返回 binding.rename(pathModule._makeLong(oldPath)),
错误:ENOENT,在 Object.renameSync(fs.js:330:18) 处没有这样的文件或目录 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\esdafdace32323432a3f'