Text which is announcement by a screen reader when a file got deleted successfully.
Classes added to the wrapped button element
The text of the button.
The user has to confirm the deletion of an already uploaded file.
Text of the abort button for the deletion of an already uploaded file.
Text shown when asked to confirm the deletion of an already uploaded file.
Text of the confirmation button for the deletion of an already uploaded file.
An url which has to be called to delete the uploaded file on the server.
General delete error text.
Error text shown when the file size exceeded the permitted size.
Error text shown when the permitted file types don't match.
General upload error text.
The name of the file which will be displayed to the user.
The name of the file on the server.
Classes added to the icon wrapper element
The id of the input[type="file"] field.
Also the id appended by "_path" of a hidden input field which will contain the name of the file on the server.
The maximum permitted file size in kb.
The name of the input[type="file"] field.
Also the name appended by "_path" of a hidden input field which will contain the name of the file on the server.
The permitted file extensions. Either a file extension as a string, an array of file extensions as strings or JSON string of such an array.
The progress of the upload between 0 and 100.
To hide the progress bar, set it to null.
Text shown after a successful upload. {fileName} will be replaced with the file name. HTML permitted.
The url of the backend script which will receive the file.
Fires when a file got deleted.
Fires when a file got uploaded.
Fires when the component gains or looses focus through the "tab" key. The component also toggles the class "hylo-has-focus".
The emitted boolean value indicates whether the component gained or lost the focus.
Generated using TypeDoc
Creates a file upload field.
Requires a corresponding script in the backend which receives the file upload.
Expects as return value a JSON object in the form of {"files": [{"name": "...", "deleteUrl": "..."}]} or {"files": []} (=> for deletion) or {"file": [], "error": "..."} (=> when error)
Creates two input fields. One of type "file" and one "hidden" (with the name appended by "_path"). The hidden input field will contain the name of the file on the server.
To prefill the component with a file, the fileNameOnServer property needs to be set but to have the prefilled file also be displayed to the user and deletable the fileName and deleteUrl needs to be set.