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
- 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
istrue
.
- 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
- S
- XS
- S
- M
- L
The size of the icon.
-
sizestring
- M
- M
- L
The size of the button.
-
variantstring
- primary
- warning
- quiet
- minimal
- actionBar
The variant of the button.
-
granite:FormFileUpload