Uploader

Multiple

Choose multiple file.

<>
	<Uploader multiple />
</>

Choose only one file.

<>
	<Uploader multiple={false} />
</>

Limit

Set limit to files.

<>
	<Uploader limit={2} />
</>

Single

Make the uploader inactive to upload files with single prop.

<>
	<Uploader single />
</>

Default files

Show default files by giving the files array to defaultFileList.

<>
	<Uploader defaultFileList={[
		{name:"testFile.docx", type:"text", url:"/home/ariuka/Documents/test.docx"},
		{name:"testFile2.docx", type:"text", url:"/home/ariuka/Documents/test.docx"}
	]} />
</>

API

import Uploader from "erxes-ui/lib/components/Uploader";
  • required prop
NAMETYPEDEFAULTDESCRIPTION
name*stringDefine file name
type*stringDefine file type
url*stringDefine file path
sizenumberDefine file size
onChangefunctionAdding attachments
singlebooleanMakes the uploader inactive to upload files
limitnumberSets limit to files
multiplebooleanDefine it can upload multiple files or only one file

Was this page helpful?