let token = uni.getStorageSync('token')
uni.uploadFile({
url: request.baseUrl + '/sys/common/upload',
filePath: res.tempFilePath,
name: 'file',
header: {
'X-Access-Token': token
},
formData: {
'biz': 'temp'
},
success: (res1) => {
uni.hideLoading()
uni.showToast({
title: '上传成功',
icon: 'none'
})
}
})
清都缥缈客
- 发布:2021-03-24 11:49
- 更新:2021-03-24 14:59
- 阅读:1081
uniapp上传大文件到阿里云上报 CORS error,小于1M的图片就可以,是什么原因
分类:uni-app
1 个回复
清都缥缈客 (作者) - 清都缥缈客
期待大佬来解惑