html52.com
我爱小程序-开发者交流社区

小程序wx.openDocument报不支持的失败文件类型错

问题模块 框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
API和组件 小程序 Bug wx.openDocument 客户端 Android 6.6.7 6.6.7.1321
wx.downloadFile({
  url: 'http://example.com/somefile.pdf',
  success: function (res) {    var filePath = res.tempFilePath
    wx.openDocument({
      filePath: filePath,
      success: function (res) {        console.log('打开文档成功')
      }
    })
  }
})

wx.downloadFile是成功了的filePath 也有值,但是到wx.openDocument就报错、到fail里面去了:

wx.openDocument:fail file type not supported 2003

我也是IOS可以,安卓就报这个错

之前就有一个和我一样问题的帖子,但是官方怎么不回答啊????

(System:Android 7.0,WeChat 6.6.7.1321)


网友回复

are you ok:

您好,请问你的问题解决了吗,有什么好的建议吗?我也遇到这个问题了

珱㻏:

求官方大神给出指导


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付