wx.saveFile保存不了,已清理临时文件缓存,但还是不行?

小程序 文章 2020-08-28 20:01 703 0 全屏看文

AI助手支持GPT4.0

wx.saveFile保存不了,已清理临时文件缓存,但还是不行?Wx.saveFile cannot be saved. The temporary file cache has been cleared, but it still doesn’t work?

wx.saveFile保存不了,已清理临时文件缓存,但还是不行?

saveFile:fail tempFilePath file not exist

图片文件前台已经渲染可以显示了的,但是就是保存不了,点击第一次没反应,第二次报错

this.setData({      img:options.url    })


saveFile:fail tempFilePath File not exist image file has been rendered and can be displayed in the foreground, but it can't be saved. Click the first time and report an error the second time this.setData ({       img:options.url     })

回答:

A德佑-黄勇¹³³³³⁰⁶⁵³⁸¹:

地址不对,报错提示文件不存在。你的this.data.img也不是指向图片文件url。

ChnZ:谢谢老师,我重新弄下
ChnZ:老师,手机上还是无法保存,电脑上好像可以保存,手机上却还是提示:saveFile:fail tempFilePath file not exist
ChnZ:还多了个报错,operateWXData:fail:cgi fail(1,-10087)"?
ChnZ:

wx.saveImageToPhotosAlbum是保持照片到相册,希望遇到同样需求问题的朋友少走弯路

Admin²⁰²⁰:

saveFile不能保存网络路径图片

tempFilePath必须本地文件

要下载保存网络文件请用wx.downloadFile,另外必须在MP后台配置好downLoadFile域名的https格式的url

ChnZ:老师,我是用savefile保存的画布生成的本地图片,但是无法保存,电脑上好像可以保存,手机上却还是提示:saveFile:fail tempFilePath file not exist
ChnZ:还多了个报错operateWXData:fail:cgi fail(1,-10087)"

-EOF-

AI助手支持GPT4.0