Props: allowedExtensions <UploaderComponent allowedExtensions=".jpg,.png"></UploaderComponent> | Props: accept <FileUpload accept=".jpg,.png"></FileUpload> | The allowedExtensions in EJ2 React is replaced with the accept in React. |
Props: asyncSettings <UploaderComponent asyncSettings={{ saveUrl: 'https://example.com/save', removeUrl: 'https://example.com/remove' }}></UploaderComponent> | Props: saveUrl, removeUrl <FileUpload saveUrl="https://example.com/save" removeUrl="https://example.com/remove"></FileUpload> | The asyncSettings in EJ2 React is split into top-level saveUrl and removeUrl in React. |
Props: autoUpload <UploaderComponent autoUpload={false}></UploaderComponent> | Props: autoUpload <FileUpload autoUpload={false}></FileUpload> | The autoUpload is supported in both EJ2 React and React. |
Props: buttons <UploaderComponent buttons={{ browse: "Choose File", clear: "Clear All", upload: "Upload All" }}></UploaderComponent> | Props: children with <BrowseButton>, <ClearButton>, <UploadButton> <FileUpload>
<BrowseButton>Choose File</BrowseButton>
<Actions>
<UploadButton>Upload All</UploadButton>
<ClearButton>Clear All</ClearButton>
</Actions>
</FileUpload> | The buttons in EJ2 React is replaced in React by composing the browse, upload, and clear buttons through the composition API using <BrowseButton>, <UploadButton>, and <ClearButton> child components. |
Props: cssClass <UploaderComponent cssClass="custom-uploader"></UploaderComponent> | Props: className <FileUpload className="custom-uploader"></FileUpload> | The cssClass in EJ2 React is replaced with the standard React className. |
Props: directoryUpload <UploaderComponent directoryUpload={true}></UploaderComponent> | Props: directory <FileUpload directory={true}></FileUpload> | The directoryUpload in EJ2 React is renamed to directory in React. |
Props: dropArea <UploaderComponent dropArea="#drop-zone"></UploaderComponent> | Props: dropArea const dropRef = useRef(null);
<FileUpload dropArea={dropRef}></FileUpload> | The dropArea is supported in both EJ2 React and React. |
Props: enableRtl <UploaderComponent enableRtl={true}></UploaderComponent> | Props: dir <Provider dir='rtl'>
<FileUpload></FileUpload>
</Provider> | The enableRtl in EJ2 React is now provided through the standard dir="rtl" attribute in React. |
Props: files const preloadFiles = [
{ name: 'Nature', size: 500000, type: '.png' },
{ name: 'Document', size: 12000, type: '.pdf' }];
<UploaderComponent files={preloadFiles}></UploaderComponent> | Props: files const preloadFiles = [
{ name: 'Nature', size: 500000, type: '.png' },
{ name: 'Document', size: 12000, type: '.pdf' }];
<FileUpload files={preloadFiles}></FileUpload> | The files is supported in both EJ2 React and React. |
Props: maxFileSize <UploaderComponent maxFileSize={5000000}></UploaderComponent> | Props: maxFileSize <FileUpload maxFileSize={5000000}></FileUpload> | The maxFileSize is supported in both EJ2 React and React. |
Props: minFileSize <UploaderComponent minFileSize={1000}></UploaderComponent> | Props: minFileSize <FileUpload minFileSize={1000}></FileUpload> | The minFileSize is supported in both EJ2 React and React. |
Props: multiple <UploaderComponent multiple={true}></UploaderComponent> | Props: multiple <FileUpload multiple={true}></FileUpload> | The multiple is supported in both EJ2 React and React. |
Props: sequentialUpload <UploaderComponent sequentialUpload={true}></UploaderComponent> | Props: sequential <FileUpload sequential={true}></FileUpload> | The sequentialUpload in EJ2 React is renamed to sequential in React. |
Props: showFileList <UploaderComponent showFileList={false}></UploaderComponent> | Props: children with <FileList> <FileUpload>
<FileList></FileList>
</FileUpload> | The showFileList in EJ2 React is replaced in React by composing <FileList> as a child component, which renders the file list inside the FileUpload. |
Props: template <UploaderComponent template="<div class='file-row'>File Template</div>"></UploaderComponent> | Props: children with <FileList> and render function <FileUpload>
<FileList>
{(file) => <div className="file-row">File Template</div>}
</FileList>
</FileUpload> | The template in EJ2 React is replaced in React by passing a render function as a child to <FileList>. |