FileUploader
General file uploader with multi-file, drag & drop, and list management.
FileUploader
General file uploader with multi-file support, drag & drop, and list management.
Basic Usage
Demo loads on client.
API
TxFileUploader Props
| Name | Type | Default | Description |
|---|---|---|---|
modelValue | FileUploaderFile[] | [] | File list |
multiple | boolean | true | Enable multi-select |
accept | string | */* | Accept types |
disabled | boolean | false | Disabled state |
max | number | 10 | Max files |
showSize | boolean | true | Show file size |
allowDrop | boolean | true | Enable drag & drop |
buttonText | string | 'Choose files' | Button text |
dropText | string | 'Drop files here' | Drop area text |
hintText | string | 'or click to browse' | Hint text |
Events
| Event | Payload | Description |
|---|---|---|
update:modelValue | (files) | File update |
change | (files) | File change |
add | (files) | Add files |
remove | ({ id, value }) | Remove file |
FileUploaderFile
| Field | Type | Description |
|---|---|---|
id | string | Unique id |
name | string | File name |
size | number | File size |
type | string | MIME type |
file | File | Original file |
Expose
| Name | Description |
|---|---|
pick() | Open system file picker |
Was this helpful?