uploadImage
Requires:
BizKit≥3.0.0@ray-js/ray≥0.3.23
Platforms:
iOS
Method signature
uploadImage(params: )Minimum SDK versions
- iOS
ThingSmartBizKitBizBundle - ≥ 5.2.1
- Android
com.thingclips.smart:thingsmart-bizbundle-bizkit - ≥ 5.2.0
Description
Upload image file
Parameters
| Property | Type | Required | Default | Description | Minimum SDK versions |
|---|---|---|---|---|---|
filePath | string | Yes | - | Image file path | — |
bizType | string | Yes | - | Business scenario identifier, obtained from Cetus (scene alias); if it does not exist, create the upload scene first | — |
contentType | string | No | - | File MIME type; required on iOS, e.g., image/jpeg | — |
delayTime | number | No | 2.0 | Polling interval for large-file upload results, in seconds. Default: 2 seconds | — |
pollMaxCount | number | No | 5 | Maximum polling attempts for large-file upload results. Default: 5 | — |
complete | () => void | No | - | Completion callback (executed on both success and failure) | — |
success | (params: Object) => void | No | - | Callback on successful API call | — |
fail | (params: Object) => void | No | - | Failure callback | — |
success callback parameters
| Property | Type | Description | BizKit Since | Minimum SDK versions |
|---|---|---|---|---|
result | string | JSON string returned by the upload API | v3.1.2 | — |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None