Parameters
Success Callback
Code Example
Error Codes
Related APIs
my.previewImage
Preview images
my.saveImage
Save image
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Choose images from album or camera.
| Property | Type | Required | Description |
|---|---|---|---|
| sizeType | Array | No | Original image, compressed image, both by default |
| sourceType | Array | No | Camera or album, ['camera', 'album'] by default |
| success | Function | No | Callback with image paths |
| fail | Function | No | Callback on failure |
| complete | Function | No | Callback that always executes |
| Property | Type | Description |
|---|---|---|
| apFilePaths | Array | Array of local file paths |
my.chooseImage({
sourceType: ['album', 'camera'],
success: (res) => {
console.log('Selected images:', res.apFilePaths);
}
});
| Code | Description |
|---|---|
| 11 | User cancels operation |