syncfusion-react-uploader
Implementing Syncfusion React Uploader
The Syncfusion React UploaderComponent provides a rich file upload control with async upload, drag-and-drop, chunk upload with pause/resume/cancel, validation, templates, form integration, and accessibility support.
Navigation Guide
Getting Started
📄 Read: references/getting-started.md
- Installation and package setup for React
- License registration
- Basic
UploaderComponentusage in JSX/TSX - CSS theme imports
- Drop area configuration
- Success and failure event handling
Asynchronous Upload
📄 Read: references/async-upload.md
asyncSettingswithsaveUrlandremoveUrl- Multiple vs. single file upload (
multiple) - Auto upload vs. manual upload (
autoUpload) - Sequential upload (
sequentialUpload) - Preloaded files (
filesproperty) - Adding custom HTTP headers via
uploading/removingevents - Server-side save/remove action examples
Chunk Upload
📄 Read: references/chunk-upload.md
- Enabling chunk upload with
asyncSettings.chunkSize - Retry configuration (
retryCount,retryAfterDelay) - Pause and resume chunked uploads (
pause,resumemethods) - Cancel uploads (
cancelmethod) chunkSuccessandchunkFailureevents- Server-side chunk handling (C#)
Validation
📄 Read: references/validation.md
- Allowed file extensions (
allowedExtensions) - File size limits (
minFileSize,maxFileSize) - Maximum file count using
selectedevent - Duplicate file prevention
- Drag-and-drop image validation
File Sources
📄 Read: references/file-source.md
- Clipboard paste upload
- Directory/folder upload (
directoryUpload) - Drag-and-drop with custom drop area (
dropArea) - Customizing drop area appearance
Templates and Customization
📄 Read: references/template-customization.md
- File list
templateproperty - Custom upload UI with
showFileList: false - Customizing action buttons (
buttonsproperty) - Progress bar customization
- Hiding the default drop area
- Style and appearance overrides
Advanced How-To Scenarios
📄 Read: references/advanced-how-to.md
- Programmatic file upload (
uploadmethod,getFilesData) - Invisible/background upload
- Image preview before uploading
- Resize images before upload
- Sort selected files
- Check file size / MIME type before upload
- Confirm dialog before file removal
- Open/edit uploaded files
- Trigger file browser from external button
- Convert uploaded image to binary
- JWT authentication for secure upload
- Form support (HTML form, template-driven, reactive)
- Localization (custom locale strings)
- Accessibility and keyboard navigation
API Reference
📄 Read: references/api.md
- All properties (
allowedExtensions,asyncSettings,autoUpload,buttons,cssClass,directoryUpload,dropArea,dropEffect,enabled,files,htmlAttributes,locale,maxFileSize,minFileSize,multiple,sequentialUpload,showFileList,template, and more) - All methods (
upload,remove,cancel,pause,resume,retry,clearAll,getFilesData,bytesToSize,createFileList,sortFileList) - All events (
uploading,success,failure,selected,removing,change,progress,chunkSuccess,chunkFailure,chunkUploading,actionComplete,beforeRemove,beforeUpload,canceling,clearing,fileListRendering,pausing,resuming,created)
Quick Start Example
import { UploaderComponent } from '@syncfusion/ej2-react-inputs';
import '@syncfusion/ej2-base/styles/material.css';
import '@syncfusion/ej2-buttons/styles/material.css';
import '@syncfusion/ej2-inputs/styles/material.css';
import '@syncfusion/ej2-popups/styles/material.css';
import '@syncfusion/ej2-react-inputs/styles/material.css';
function App() {
const asyncSettings = {
saveUrl: 'https://services.syncfusion.com/react/production/api/FileUploader/Save',
removeUrl: 'https://services.syncfusion.com/react/production/api/FileUploader/Remove'
};
const onSuccess = (args: any) => {
console.log('Upload operation:', args.operation, 'File:', args.file.name);
};
const onFailure = (args: any) => {
console.error('Upload failed:', args.file.name);
};
return (
<UploaderComponent
asyncSettings={asyncSettings}
autoUpload={false}
success={onSuccess}
failure={onFailure}
/>
);
}
Common Patterns
Auto Upload with Validation
<UploaderComponent
asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
allowedExtensions=".pdf,.doc,.docx"
maxFileSize={5000000}
multiple={true}
/>
Manual Upload with Custom Buttons
<UploaderComponent
asyncSettings={{ saveUrl: '/api/upload/save', removeUrl: '/api/upload/remove' }}
autoUpload={false}
buttons={{ browse: 'Choose File', clear: 'Clear All', upload: 'Upload All' }}
/>
Chunk Upload for Large Files
<UploaderComponent
asyncSettings={{
saveUrl: '/api/upload/save',
removeUrl: '/api/upload/remove',
chunkSize: 500000 // 500 KB chunks
}}
/>
Key Decision Guide
| Need | Property/Event |
|---|---|
| Server URLs | asyncSettings.saveUrl + asyncSettings.removeUrl |
| Auto vs manual upload | autoUpload (default: true) |
| Large file upload | asyncSettings.chunkSize |
| Restrict file types | allowedExtensions |
| Limit file size | maxFileSize / minFileSize |
| Preload files from server | files prop |
| Upload one at a time | sequentialUpload: true |
| Entire folder upload | directoryUpload: true |
| Custom drop target | dropArea |
| Custom file list UI | template or showFileList: false |
| Add auth headers | uploading event → args.currentRequest.setRequestHeader() |
| Send extra form data | uploading event → args.customFormData |
More from syncfusion/react-ui-components-skills
syncfusion-react-grid
Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
118syncfusion-react-rich-text-editor
Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.
114syncfusion-react-common
Common utilities and features for Syncfusion React components. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion React components.
112syncfusion-react-themes
Use this skill when users need to apply themes, customize appearance, switch dark mode, use CSS variables, configure icons, or modify visual styling for Syncfusion React components. Covers icon library, size modes, and Theme Studio integration.
112syncfusion-react-scheduler
Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.
111syncfusion-react-treegrid
Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.
110