Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

WeChat small program API pictures ... save pictures


May 18, 2021 WeChat Mini Program Development Document


Table of contents


wx.saveImageToPhotosAlbum(Object object)

Base library 1.2.0 starts to support, and low versions need to be compatible.
User authorization is required for scope.writePhotosAlbum before the call

Save the picture to the system album.

Parameters

Object object

Property Type The default Required Description
filePath string Is Picture file paths, which can be temporary file paths or permanent file paths (local paths), do not support network paths
success function Whether The interface calls a successful callback function
fail function Whether The interface calls the failed callback function
complete function Whether Callback function at end of interface call (call succeeds, fails are executed)

The sample code

wx.saveImageToPhotosAlbum({
  success(res) { }
})