FileUpload

The File Upload component enables users to select and upload files from their device. It supports both drag-and-drop and traditional file selection methods, providing a straightforward way to manage file uploads. This component is essential for applications that require users to submit documents, images, or other file types, ensuring a smooth and efficient upload experience.

FileUpload

accept

string | undefined = */*

Pass a comma-separated string of file types e.g. "image/png" or "image/png,image/jpeg"

handleAddFile

(files: FileWithPreviewType | FileWithPreviewType[]) => void

handleRemoveFile

HandleRemoveType

maxSize

number | undefined = 2000000

onBlur

() => void

onChange

(event: { preventDefault: () => void; target: Record<string, unknown>; }) => void

preview

FC<PreviewProps>

Preview