最近在写一个 七牛云的 上传凭证上传功能,安卓测试成功,h5测试成功,ios测试失败。
for (let a = 0; a < that.value.length; a++) {
if (that.value[a].progress != 100) {
const uploadTask = uni.uploadFile({
url: ' http://upload.qiniup.com/',
filePath: that.value[a]['blob'],
name: 'file',
header: {
'content-type': 'multipart/form-data',
},
formData: {
key:
qiniuToken.dirPrefix + that.getUUID() + '.' + that.value[a]['name'],
token: qiniuToken.token
},
success: result => {
console.log(result, '上传完成');
}
});
uploadTask.onProgressUpdate(res => {
//console.info(res, '当前照片上传进度', a)
})
}
有人遇到和我一样的情况吗?
0 个回复