首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >小程序openDocument里的路径只能从downloadFile的返回获取?不能是本地路径?

小程序openDocument里的路径只能从downloadFile的返回获取?不能是本地路径?

提问于 2018-03-22 11:08:24
回答 2关注 0查看 510

我想用openDocument打开word、pdf文档 但好像不能是本地路径? downloadFile也不能下载本地路径?

wx.downloadFile({
            url: '../../docs/111.docx',
            success: function (res) {
                console.log(res)
              var filePath = res.tempFilePath
              wx.openDocument({
                filePath: filePath,
                success: function (res) {
                  console.log('打开文档成功')
                }
              })
            }   
          })
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档