File Upload

This option allows you to upload files which can then be used to execute instructions autonomously, drive curves, for example.

Tag

"type": "file-upload"

Values

The file-upload type supports the following values:

disableSubmit

A Boolean field which if true tells the webapp to disable the submit button until a file has been uploaded.

When it is false the submit button will not be disabled by this option.

accept

Which media type the device can understand, and thus are allowed to be uploaded.

This can either be a single string or an array of strings:

"accept": ".csv"
"accept": [".csv", ".json"]

If you configure an empty string / array, all media types can be uploaded.

Please refer to IANA Media Types to see all supported types.

Argument Passed to the Device

This option does not pass any parameter instead it passes the file attached to /files/upload/.

Note

This is a special type. It does not pass any value to device.execute. Thus you must not add a parameter there.

Example

This example shows how this type of option will look in the webapp.

Option configuration

{
    "name": "File upload",
    "type": "file-upload",
    "id": "upload-1",
    "values": {
        "disableSubmit": true,
        "accept": []
    }
}

Result

input example