网上找了各种资料,安装各种网友说的包,但是就是解决不了问题。
前端代码
$.ajax({
url:'/pass/uploadexcel',
type:'POST',
dataType:'json',
data:data,
contentType:false,
success:this.uploadSuccess,
processData: false,
error:this.uploadError
});
这样我给后端的Nodejs提交了一个formdata的数据(就是一个文件),但是后端不知道使用什么把它给解析出来。
求大神指导一下
If you upload a file, the data should be written like this
Use res.files in express to get uploaded files
Formidable package solves all your post problems
For details, please read its documentation first
https://www.npmjs.com/package...
//Core
form.parse(req, function(err, fields, files) {
});