filefield

This component represents a field for uploading a file.

Configuration

For general configuration options, see General component configuration.

Specific configuration

type ("filefield")

Type of component.

value (Binding | string)

Content of the file in Base64-encoded string.

General configuration

In addition to the configurations valid for all Configurationsthe following configurations can optionally be set: disabled, errorTarget, icon, labels, label Settings, onChange, required.

Example

filefield.json
{
  "$schema": "https://forms.virtimo.net/5.1.0/schema.json",
  "metaData": {
    "id": 0,
    "version": 0
  },
  "components": [
    {
      "type": "container",
      "label": "Filefield Component Example",
      "components": [
        {
          "label": "Upload your file here",
          "type": "filefield",
          "value": "${/data/fileBase64}"
        },
        {
          "label": "Submit",
          "type": "button",
          "action": "submit"
        }
      ]
    }
  ],
  "configuration": {
    "submitUrl": "http://localhost:3000/foo"
  },
  "state": {
    "data": {}
  }
}
Embedded preview

Keywords: