Beta
Search
CTRLK

Uploader

The Filenest.Uploader is used to select files for upload. It is using react-dropzone under the hood.

The component must be used as a child of <Filenest.Root>

Example Usage

<Filenest.Uploader
  children={({ rootProps, inputProps, isDragActive }) => (
    <div {...rootProps}>
      <input {...inputProps} />
      Drop files here or click to upload
    </div>
  )}
/>
While you could use this component to track upload progress, you should use the <Filenest.Queue> component instead, because it offers more flexibility.

Props

PropTypeDefault
allowDrop
boolean | undefined
true
allowClick
boolean | undefined
true
autoUpload
boolean
false
multiple
boolean
true
onUpload
((result: unknown) => void) | undefined
-
uploadPath
string | undefined
-

Render Props

PropTypeDefault
rootProps
DropzoneRootProps
-
inputProps
DropzoneInputProps
-
isDragActive
boolean
-
uploads
Upload[]
-
upload
() => void
-

Type References

Upload

PropTypeDefault
raw
File
-
progress
number
-
isUploading
boolean
-
isError
boolean
-
isDone
boolean
-

On this page