wx.downloadFile和wx.saveFile下载rar压缩包后缀名
发布于 4 年前 作者 xiuying06 8219 次浏览 来自 问答

调用wx.downloadFile  wx.saveFile  下载保存rar压缩包

机型:小米note3

怎么查找下载之后的文件???

wx.downloadFile({

   url: xiazai_read,

   success: function(res) {

       console.log(res)

       var tempFilePath = res.tempFilePath;

       wx.saveFile({

           tempFilePath: tempFilePath,

           success: function(res) {

               console.log(res)

               var savedFilePath = res.savedFilePath;

               console.log(“保存在:” + savedFilePath)

           }

       })

   }

})

1 回复

在社区找到答案了

/Tencent/MicroMsg/wxafiles/wx…(省略一堆)/(文件名)

但是请问官方 后缀名怎么处理

回到顶部