Summary of uniapp development WeChat applet saving file scheme
1. Demand background
- Recently, I am using uniapp to develop a WeChat applet project, and now I need to save the file.
solution
-
// 方法如下,filePath:文件地址: uni.authorize({ 'scope.writePhotosAlbum', success() { uni.saveImageToPhotosAlbum({ filePath, success: function() { Toast('保存成功') } }) }, fail(err) { Toast(err.errMsg) } })
-
solve.