openDocument API 无法打开saveFile API保存的文件
发布于 4 年前 作者 cpan 4933 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

使用downloadFile API 下载后的临时路径可以打开,而且saveFile API保存的文件无法在手机上找到,使用腾讯文档APP也无法找到

1 回复
wx.downloadFile({  // 示例 url,并非真实存在
  url: 'http://example.com/somefile.pdf',
  success(res) {    const filePath = res.tempFilePath
    wx.openDocument({
      filePath:savedFilePath,
      success(res) {        console.log('打开文档成功')
      }
    })
  }
})
回到顶部