Skip to main content

downloadFile

Downloads a file to the device's local storage. To skip the completion, async has to be used.

Field Configurations

KeyTypeDescriptionDefault Value
"params" (required)Objectundefinednull

Parameters

KeyTypeDescriptionDefault Value
"additionalHeaders"AdditionalHeadersAdditional HTTP headers which will be appended to the request.null
"async"BooleanSpecifies whether the action should perform asynchronously.null
"field"StringThe name of the field.null
"fileExtension"StringThe type of the file to be downloaded.null
"query"StringThe name of the query.null
"queryParams"ArrayThe list of the appended query parameters.null
"table"StringThe name of the database table.null
"url"StringThe URL of the file to be downloaded.null
"urls"ArrayThe list of file URL's to be downloaded.null

Inherited

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType 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.