BwFileUploader | bw-file-uploader
Overview
The file uploader component allows users to select files, as well as drag and drop files to the uploader.
Usage
Accept
InvalidExtention event will be emitted if user tries to upload a file that doesn't matched any of the allowed extensions.
<div style="padding-bottom: 8px;">
<bw-file-uploader accept=".pdf, .png, .jpg, .mp3, .wav, .m4a, .aac"></bw-file-uploader>
</div>
Disabled
<div style="padding-bottom: 8px;">
<bw-file-uploader disabled="true"></bw-file-uploader>
</div>
Max File Size
FileTooLarge event will be emitted if user tries to upload a file that exceeds the maximum size allowed.
<div style="padding-bottom: 8px;">
<bw-file-uploader maxFileSize="20"></bw-file-uploader>
</div>
Upload Limit
MaxFilesUploaded event will be emitted if user tries to upload more than the maximum amount allowed.
<div style="padding-bottom: 8px;">
<bw-file-uploader uploadLimit="3"></bw-file-uploader>
</div>
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
accept | accept | Accepted file types. If left blank, all file types are allowed. | string | undefined |
disabled | disabled | Disables click and drag and drop functionality if set to true. | boolean | false |
maxFileSize | max-file-size | Maximum size of each file in MB. | number | 50 |
uploadLimit | upload-limit | Max number of files that can be uploaded. | number | undefined |
Events
| Event | Description | Type |
|---|---|---|
fileTooLarge | Emits whenever the user tries to upload a file that's larger than the maximum file size allowed. Emits the file that fails the condition. | CustomEvent<any> |
invalidExtention | Emits whenever the user tries to upload files that don't match the allowed file extensions. Emits the file that fails the condition. | CustomEvent<any> |
maxFilesUploaded | Emits whenever the user tries to upload more than the maximum files allowed. Does not emit any data. | CustomEvent<any> |
uploadedFiles | Emits whenever files are dragged and dropped into the upload box or added through the windows file selector. Emits the files uploaded. | CustomEvent<any[]> |
Dependencies
Depends on
Graph
© 2025 United Systems & Software - All Rights Reserved.