File Upload
A versatile file upload component that supports single and multiple file uploads with preview capabilities. Features support for image previews, progress tracking, drag-and-drop functionality, and various upload methods including S3 and local storage. Includes file type validation and custom upload handlers.
Extends: fieldComponent
Fields
Name | Code | Data Type | Description |
|---|---|---|---|
Access Function ID |
| text | Unique identifier for access control functions |
Multi Uploader |
| boolean | Enables multiple file upload capabilities |
Custom Tags |
| text | Additional tags for customizing upload behavior (#multiple) |
Image Preview |
| boolean | Enables preview for uploaded image files |
Upload Headers |
| object | Custom headers for upload requests |
Bucket Config |
| object | Configuration for S3 bucket uploads |
Allowed File Types |
| text | List of accepted file extensions |
Max File Size |
| text | Maximum allowed file size |
Upload URL |
| text | Custom upload endpoint URL |
Methods
Name | Description |
|---|---|
| Retrieves the list of uploaded files |
| Removes a specific file from the uploaded files list |
| Clears all uploaded files and resets the uploader |
| Initiates download of a specific uploaded file |
| Checks if the uploaded file is an image based on its extension |
| Extracts and returns the file name from the file path |
Events
Name | Description |
|---|---|
| Triggered when files are added or removed |
| Triggered when the upload component loses focus |
| Triggered when the upload component gains focus |
| Triggered when file upload begins |
| Triggered when file upload completes |
| Triggered when an upload error occurs |
| Triggered when a new file is selected |
| Triggered when a file is removed |