downloadFile
Downloads a file to the device's local storage.
To skip the completion, async
has to be used.
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"params" (required) | Object | undefined | null |
Parameters
Key | Type | Description | Default Value |
---|---|---|---|
"additionalHeaders" | AdditionalHeaders | Additional HTTP headers which will be appended to the request. | null |
"async" | Boolean | Specifies whether the action should perform asynchronously. | null |
"field" | String | The name of the field. | null |
"fileExtension" | String | The type of the file to be downloaded. | null |
"query" | String | The name of the query. | null |
"queryParams" | Array | The list of the appended query parameters. | null |
"table" | String | The name of the database table. | null |
"url" | String | The URL of the file to be downloaded. | null |
"urls" | Array | The list of file URL's to be downloaded. | null |
Inherited
From Base Action
Base Action
Field Configurations
Key | Type | Description | Default Value |
---|---|---|---|
"dynamicParams" | Object | Dynamic params to retrieve data from a specific context e.g. a userSetting. | null |
"leadingDelimiter" | String | The leading mustache delimiter to use. | null |
"params" | Object,Array | Object containing the properties of the action. | null |
"trailingDelimiter" | String | The trailing mustache delimiter to use. | null |
"type" | String | Type name of the action. | null |
Examples
Example 1: Download a PDF file to the local storage.
Goal: Create a downloadFile action that will download a PDF document.
Url
, field
and fileExtension
keys have to be assigned within the params
object of the action.
{
"type": "downloadFile",
"params": {
"url": "https://example.mobilitysuite.de/pdf",
"field": "file",
"fileExtension": "pdf"
}
}
Result:
A downloadFile
action has been created.