调用wx.getImageInfo 得到临时路径变成txt,实际是png格式的?

发布于 6 年前作者 jiexue2313 次浏览最后编辑 6 年前来自 issues

eg: https://XXXXXXXX/hdb/2021/04/13/829da7070fd74674ae41d902e40ae6c6 使用wx.getImageInfo得到的临时路径变成了txt,这个怎么处理

以下是通过wx.getImageInfo得到的信息。

{“errMsg”:“getImageInfo:ok”,“width”:221,“height”:219,“type”:“png”,“orientation”:“up”,“path”:"http://tmp/J59j2gt1hqx44755c022313019bf83f9c7ca526ffd31.txt"}"

2 回复
chaotian
chaotian1 楼5 年前

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

qlai
qlai2 楼4 年前

wx.downloadFile({

      url: downSrc,

      filePath: wx.env.USER_DATA_PATH +‘/’+filename + ‘111.png’, 

      success: function (res) {}

    });

可以使用wx.env.USER_DATA_PATH 来指定临时路径