Parameters
Code Example
Error Codes
Related APIs
my.chooseImage
Choose images
my.downloadFile
Download file
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Save an image to the device album.
| 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; false by default |
| success | Function | No | Callback on success |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
my.saveImage({
url: 'https://example.com/image.jpg',
success: () => {
my.showToast({ content: 'Saved to album', type: 'success' });
},
fail: () => {
my.showToast({ content: 'Save failed', type: 'fail' });
}
});
| Code | 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 |