FileUpload

/libs/granite/ui/components/coral/foundation/form/fileupload

A field component to upload file.

It extends Field component.

It has the following content structure:

granite:FormFileUpload
  1. granite:FormField
namestring

The name that identifies the field when submitting the form.

emptyTextstring
i18n

A hint to the user of what can be entered in the field.

disabledboolean

Indicates if the field is in disabled state.

requiredboolean

Indicates if the field is mandatory to be filled.

asyncboolean

true to upload the files asynchronously.

validationstring
multiple

The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

multipleboolean

Indicates if multiple files can be uploaded.

autoStartboolean

true to make the upload starts automatically once the file is selected.

uploadUrlstringel

The URL to upload the file. This is only required when autoStart is true.

sizeLimitlong

The file size limit.

mimeTypesstring
multiple

The browse and selection filter for file selection. E.g: [“.png”,”.jpg”] or [“image/*”].

textstring
i18n

The text of the button.

hideTextboolean

Visually hide the text. It is RECOMMENDED that every button has a text for a11y purpose. Use this property to hide it visually, while still making it available for a11y.

iconstring

The icon of the button.

iconSizestring
  1. S
  1. XS
  2. S
  3. M
  4. L

The size of the icon.

sizestring
  1. M
  1. M
  2. L

The size of the button.

variantstring
  1. primary
  2. warning
  3. quiet
  4. minimal
  5. actionBar

The variant of the button.