heavens
heavens
  • 发布:2022-10-24 17:38
  • 更新:2022-10-24 17:38
  • 阅读:206

uplaodFile ios下qq浏览器上传缺少参数

分类:uni-app

问题描述
ios qq 调研上传后端无法获得参数,其他平台可以,imagePath 参数伟canvas 获得的base64

 let input = this.dataURLtoFile(that.imagePath, 'file.png')  
uni.uploadFile({  
                        url: baseUrl   '/file/oss/upload',  
                        file:input,  
                        header: {  
                            'Authorization': getStore('token'),  
                        },  
                        formData: {  
                            file:input  
                        },  
                        name: 'file',  
                        success: (res) => {  
                            var {  
                                data  
                            } = JSON.parse(res.data);  
                            that.imageFile = data.link  
                            console.log(that.imageFile, 'that.imageFile')  
                            // that.OrderHandle();  
                        },  
                        fail:(res)=> {  
                            // that.OrderHandle();  
                        },  
                        complete:()=> {  
                            that.OrderHandle();  
                        }  
                    })

设置
header: {
'Authorization': getStore('token'),
'content-type': 'multipart/form-data' // 无效还是 json
},

复现步骤
[复现问题的步骤]
使用qq直接打开网站,调用上传失败

预期结果
上传成功

实际结果
上传缺少参数

系统信息:
iphoneX
ios15.6

2022-10-24 17:38 负责人:无 分享
已邀请:

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