wx.downloadFile 返回403
发布于 5 年前 作者 wanli 15194 次浏览 来自 问答

wx.downloadFile下载文件https://img.mumiweixin.com/gif/frame-1.jpg

success,complete都返回{statusCode: 403, errMsg: “downloadFile:ok”}

fail无返回

代码如下:

wx.downloadFile({
              url: item.url,
              success: function(res) {
                //console.log(res)
                if (res.statusCode === 200) {
                    that.imageOnLoad({"src": res.tempFilePath, "id": index})
                }
              },
              fail: function(err){
                console.log(err)
              },
              complete:function(err){
                  console.log(err)
              }
            })

已设置downloadFile合法域名

https TLS版 也支持1.0、1.1、1.2


如果换成 http://p3i5a34ey.bkt.clouddn.com/gif/frame-1.jpg,开发者工具取消验证HTTPS,就wx.downloadFile成功


请问需要怎么解决wx.downloadFile HTTPS文件这个问题

2 回复

官方能抽空帮忙看看吗

官方能抽空帮忙看看吗

回到顶部