uni-app hbuildx升级为4.36后,uni.uploadFile上传视频到阿里云总是报400,且uni.chooseImage选择视频总是失败报错
uni-app hbuildx升级为4.36后,uni.uploadFile上传视频到阿里云总是报400,且uni.chooseImage选择视频总是失败报错
操作步骤:
- 调用uni.chooseImage和uni.uploadFile
预期结果:
- 选择视频正常,上传视频正常
实际结果:
- 选择视频报
{"errMsg":"chooseVideo:fail [File:-1100]在此服务器上找不到所请求的URL。,","errCode":-100,"code":-100}
,上传视频到阿里云报
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>IncorrectNumberOfFilesInPOSTRequest</Code>
<Message>POST requires exactly one file upload per request.</Message>
<RequestId>675B8F6ED326A131330054DF</RequestId>
<HostId>jwmqc.oss-cn-shenzhen.aliyuncs.com</HostId>
<EC>0006-00000107</EC>
<RecommendDoc>https://api.aliyun.com/troubleshoot?q=0006-00000107</RecommendDoc>
</Error>
bug描述:
hbuildx升级为4.36后,uni.uploadFile上传视频到阿里云总是报400,而且uni.chooseImage选择视频总是失败报错。 uni.uploadFile上传视频到阿里云报:
<?xml version="1.0" encoding="UTF-8"?>
<Error>
<Code>IncorrectNumberOfFilesInPOSTRequest</Code>
<Message>POST requires exactly one file upload per request.</Message>
<RequestId>675B8F6ED326A131330054DF</RequestId>
<HostId>jwmqc.oss-cn-shenzhen.aliyuncs.com</HostId>
<EC>0006-00000107</EC>
<RecommendDoc>https://api.aliyun.com/troubleshoot?q=0006-00000107</RecommendDoc>
</Error>
uni.chooseImage选择视频报错:{"errMsg":"chooseVideo:fail [File:-1100]在此服务器上找不到所请求的URL。,","errCode":-100,"code":-100}
相关链接:
2 回复
提供一下示例项目吧