清都缥缈客
清都缥缈客
  • 发布:2021-03-24 11:49
  • 更新:2021-03-24 14:59
  • 阅读:1081

uniapp上传大文件到阿里云上报 CORS error,小于1M的图片就可以,是什么原因

分类:uni-app
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 负责人:无 分享
已邀请:
清都缥缈客

清都缥缈客 (作者) - 清都缥缈客

期待大佬来解惑

该问题目前已经被锁定, 无法添加新回复