uni.uploadFile({
url: 'http://192.168.101.10:8090/dynamic/upload', //仅为示例,非真实的接口地址
files: imgs,
formData:{
uploadFile:imgs
},
header: {
"Content-Type": "multipart/form-data",
'Authorization': Bearer
+ token.token,
},
success: (uploadFileRes) => {
console.log(uploadFileRes.data);
}
});
2***@qq.com
- 发布:2021-11-23 10:29
- 更新:2021-11-23 10:31
- 阅读:423
2***@qq.com (作者)
那如果在小程序里面要多图上传怎么弄?只能一张一张图片上传吗?
2021-11-23 10:55
秋凡
回复 2***@qq.com: 循环调用
2021-11-23 11:08