Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

通过el-upload上传excel文件,后端(nodejs,koa)如何接收这个文件

image.png

使用element的el-upload组件上传xlsx文件,后端如何接收这个文件啊,请赐教
服务端是nodejs+koa,el-upload用的是默认action

服务端打印如下
image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

目前我有使用formidablemulter这两个来处理表单提交,比较好用,你可以看一下,任选其一。

form.parse(req, (err, fields, files) => {
  // fields 表单域的值
  // files 上传的文件,文件你就可以用这个
});

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...