my.saveImage saves online images from a URL to the device's camera gallery.
my.saveImage({
url: 'https://img.example.com/example.jpg'
});
| Property | Type | Required | Description |
|---|---|---|---|
url | String | Yes | URL of the image to be saved. |
showActionSheet | Boolean | No | Whether to show the menu when saving image. By default, it is false. |
success | Function | No | Callback function upon call success. |
fail | Function | No | Callback function upon call failure. |
complete | Function | No | Callback function upon call completion (to be executed upon either call success or failure). |
| Error | Description |
|---|---|
2 | Invalid parameter, no url parameter transferred. |
15 | Album right not enabled (iOS only). |
16 | Insufficient album storage on cellphone (iOS only). |
17 | Other errors during picture saving. |
url parameter is required and must be a valid image URLshowActionSheet: true to display a menu when saving