在节点js中上传时获取此类型错误

时间:2017-04-13 18:46:37

标签: node.js

这是我得到的错误

  <form action = "http://127.0.0.1:8081/file_upload" method = "POST" 
     enctype = "multipart/form-data">
     <input type="file" name="file" size="50" />
       <br />
     <input type = "submit" value = "Upload File" />
  </form>

我的HTML代码

console.log(req.file.file.name);
console.log(req.file.file.path);
console.log(req.file.file.type);
var file = __dirname + "/" + req.file.file.name;

我的js代码

nan

哪里我做错了?

0 个答案:

没有答案