FileUpload¶
-
/libs/granite/ui/components/foundation/form/fileupload
A field component to upload file.
It extends
Field
component.It has the following content structure:
- granite:FormFileUpload
- idstring
The id attribute.
- relstring
The class attribute. This is used to indicate the semantic relationship of the component similar to
rel
attribute.
- classstring
The class attribute.
- titlestring
- i18n
The title attribute.
-
namestring
- file
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.
- validationstring
- multiple
The name of the validator to be applied. E.g.
foundation.jcr.name
. See validation in Granite UI.
- textstring
- i18n
The text of the button.
- iconstring
The icon of the button.
-
variantstring
- secondary
- quiet
- multiple
The variant of the button.
- multipleboolean
Indicates if multiple files can be uploaded.
- fileNameParameterstring
The parameter representing the file name, for instance “./fileName” or “./image/fileName”. It will be used to determine the (relative) location where to store the name of the file.
- fileReferenceParameterstring
The location where to store the reference of the file (when a file already uploaded on the server is used), usually ./fileReference or ./image/fileReference. NB: This is only working in the context of AEM Authoring
- uploadUrlstring
The URL where to upload the file, you can use
${suffix.path}
to use the current suffix
- uploadUrlBuilderstring
The upload URL builder.
- sizeLimitlong
The file size limit.
- autoStartstring
true
to make the upload starts automatically once the file is selected.
-
useHTML5boolean
- true
Prefers HTML5 to upload files (if browser allows it).
- dropZonestring
The drop zone selector to upload files from file system directly (if browser allows it).
- mimeTypesstring
- multiple
The browse and selection filter for file selection. E.g: [“.png”,”.jpg”] or [“image/*”].
-
chunkUploadSupportedboolean
- false
Flag to indicate if chunked upload is supported.
- chunkSizelong
Size of chunk.
- chunkUploadMinFileSizelong
Minimum file size which will use chunked upload.