uni版本:"@dcloudio/uni-app": "^3.0.0-alpha-3050320220727002",
运行环境: 小程序
运行系统:win10
uni.uploadFile({
url: aliyunServerURL,
formData: {
"key": aliyunFileKey,
"policy": policyBase64,
"OSSAccessKeyId": accessid,
"signature": signature,
"success_action_status": '200',
},
filePath: filePath,
name: 'file',
header: { "Content-Type": "multipart/form-data" },
success: function (res) {
if (res.statusCode != 200) {
failc(new Error('上传错误:' + JSON.stringify(res)))
return;
}
successc(aliyunServerURL + aliyunFileKey);
},
fail: function (err) {
err.wxaddinfo = aliyunServerURL;
failc(err);
},
})
试过各种办法了,但在network里都没看到我传进去的formdata