Vue/Element ui/Formdata 实现文件上传,文件为空
发布于 3 年前 作者 feer 1474 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

Swagger中测试是能成功的:

curl -X POST --header ‘Content-Type: multipart/form-data’ --header ‘Accept: application/json’ --header ‘auth-token: TEST’ {“type”:“formData”} ‘http://221.3.215.48:8000/api/fireMachine/upload?fire_machine_id=3

我在vue中使用的:

image

image
返回“无文件” 请问这该怎么解决呢

回到顶部