The ui5-file-uploader opens a file explorer dialog and enables users to upload files.
The component consists of input field, but you can provide an HTML element by your choice
to trigger the file upload, by using the default slot.
Furthermore, you can set the property "hideInput" to "true" to hide the input field.
To get all selected files, you can simply use the read-only "files" property.
To restrict the types of files the user can select, you can use the "accept" property.
And, similar to all input based components, the FileUploader supports "valueState", "placeholder", "name", and "disabled" properties.
Comma-separated list of file types that the component should accept. Note: Please make sure you are adding the . in front on the file type, e.g. .png in case you want to accept png's only.
Determines the name with which the component will be submitted in an HTML form. Important: For the name property to have effect, you must add the following import to your project: import "@ui5/webcomponents/dist/features/InputElementsFormSupport.js"; Note: When set, a native input HTML element will be created inside the component so that it can be submitted as part of an HTML form. Do not use this property unless you need to submit a form.
By default the component contains a single input field. With this slot you can pass any content that you wish to add. See the samples for more information. Note: If no content is provided in this slot, the component will only consist of an input field and will not be interactable using the keyboard. Also it is not recommended to use any non-interactable components, as it may lead to poor accessibility experience.
Defines the value state message that will be displayed as pop up under the component. Note: If not specified, a default text (in the respective language) will be displayed. Note: The valueStateMessage would be displayed, when the component is in Information, Warning or Error value state.
Event is fired when the value of the file path has been changed. Note: Keep in mind that because of the HTML input element of type file, the event is also fired in Chrome browser when the Cancel button of the uploads window is pressed.