exports.submit = function(req, res, next){
var original_path = req.files.filesubmit.path;
var target_path = './submitted/';
console.log(path.existsSync(original_path));//-----------//TRUE!
fs.rename(original_path, target_path, function(err){
if (err) throw err;//------//error:ENOENT,No such file or directory
fs.unlink(tmp_path, function(){
// ir (err) throw err;
res.send('submitted');
})
})
}
明明path.existsSync(original_path)是TRUE,
为何抛出error:ENOENT,No such file or directory