chooseFile
Description
Selects an image or file from the device’s storage.
Input / Parameter
Name | Description | Input Type | Default | Options | Required |
---|---|---|---|---|---|
type | Type of file to choose. | Text | - | Image, Other_Files | Yes |
multiple | Whether to select multiple files or not. | Boolean | false | true, false | No |
Output
Description | Output Type |
---|---|
Returns the formatted information. | Object |
Callback
callback
The functions to be executed if file is chosen successfully.
Description | Output Type |
---|---|
The information of the chosen files. | Object |
Object format.
errorCallback
The functions to be executed if the file is not chosen.
Description | Output Type |
---|---|
The error message. | Text |
Example
In this example, we will use the Device.chooseFile
function to get some files data and show it on the console.
Step
Call the function
Device.chooseFile
inside the eventflow, and for it'stype
param select valueImage
and for it'smultiple
param select valuetrue
.Call the function
Log.write
inside theDevice.chooseFile
function callback, and for it'svalue
param change the param type toinput
.
Result
Trigger the event.
Select the images.
Check the console.
Last updated