saveFile:fail tempFilePath file not exist
图片文件前台已经渲染可以显示了的,但是就是保存不了,点击第一次没反应,第二次报错
this.setData({ img:options.url })
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 })
回答:
wx.saveImageToPhotosAlbum是保持照片到相册,希望遇到同样需求问题的朋友少走弯路
saveFile不能保存网络路径图片
tempFilePath必须本地文件
要下载保存网络文件请用wx.downloadFile,另外必须在MP后台配置好downLoadFile域名的https格式的url
地址不对,报错提示文件不存在。你的this.data.img也不是指向图片文件url。