请求代码
uni.uploadFile({
url: `${baseUrl}/logistics/raw/seal/commit`,
name: 'files',
formData: params,
filePath: '',
files: images,
header: {
Authorization: 'Bearer ' + token,
},
success: (res) => {
console.log(res)
},
fail: (err) => {
console.log(err)
},
})
images 里面的数据
let file = {
name: 'images' + index,
uri: element.uri, //"http://tmp/szyutwQlJeHjb25b5599c3ff6abaf6cccc7354477795.png"
}
images.push(file)
6***@qq.com (作者)
单个可以,我看了下,是不是因为微信小程序的不支持多文件上传?
2023-12-14 10:11
套马杆的套子
回复 6***@qq.com: 小程序啊。那是不支持,files只支持app和H5
2023-12-14 10:48