FileUpload API
import { FileUpload } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
accept | string | |
buttonText | string | |
description | string | |
disabled | boolean | |
dropLabel | string | |
label | string | |
maxFiles | number | |
maxSize | number | |
multiple | boolean | |
name | string | |
onChange | (files: File[]) => void | |
onReject | (rejected: FileUploadRejectedFile[]) => void | |
onUploadCancel | (detail: UploadLifecycleDetail) => void | |
onUploadComplete | (detail: UploadLifecycleDetail) => void | |
onUploadError | (detail: UploadLifecycleDetail) => void | |
onUploadProgress | (detail: UploadLifecycleDetail) => void | |
onUploadRequest | FileUploadUploadRequest | |
onUploadStart | (detail: UploadLifecycleDetail) => void | |
onUploadSuccess | (detail: UploadLifecycleDetail) => void | |
progress | Record<string, number> | |
required | boolean | |
showPreviews | boolean | |
uploadButtonText | string | |
uploadOnSelect | boolean |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-file-upload>
FileUpload renders the ui-file-upload custom element from @editora/ui-core, which can also be used without React.
Attributes: accept, button-text, data-error, description, disabled, drop-label, label, max-files, max-size, multiple, name, progress, required, show-previews, surface, upload-button-text, upload-on-select
Events: change, clear, reject, upload-cancel, upload-complete, upload-error, upload-progress, upload-start, upload-success