syncfusion-react-file-manager — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited syncfusion-react-file-manager (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A comprehensive guide to implementing the Syncfusion React File Manager component for building file system interfaces with rich features like drag-drop, multi-view support, custom operations, and full accessibility.
🚀 Just Getting Started? → Read Getting Started for installation and basic setup
🛠️ Need to Build File Operations? → Check File Operations (CRUD) for create, read, update, delete patterns
📊 Working with Local Data? → See Flat Data Structure for in-memory files and event-driven operations
✅ Need Multiple File Selection? → Learn Multiple Selection & Range Selection for Ctrl+Click, Shift+Click, drag selection
⚡ Handling Large File Lists? → Use Virtualization for smooth scrolling with 1000+ files
🎨 Want to Customize the UI? → See Customization & Styling for theming and layout options
⚙️ Looking for Advanced Features? → Explore Advanced Features for performance, custom providers, and API integration
♿ Need Accessibility or Multi-Language? → Visit Accessibility & Localization for WCAG and i18n
🔐 Need User Access Control? → Learn Access Control for role-based permissions and security
📤 Passing Custom Headers to Server? → See Pass Custom Value to Server for setRequestHeader and authentication
🎯 Need Advanced Customization? → Check Adding Custom Item to Context Menu and Adding Custom Item to Toolbar
🔧 Want to Enable/Disable Toolbar Items? → See Enable/Disable Toolbar Item for programmatic control
🖼️ Customizing Thumbnails & Icons? → Learn Customize Custom Thumbnail for icon templates
📁 Customizing Navigation Pane? → See Customize Navigation Pane for tree view customization
✨ Pre-selecting Items? → Learn Preselect Items for default selections
📦 File Manager Inside Dialog/Tabs? → See Nested Items for embedding in other components
Use this skill when you need to:
The File Manager is a graphical user interface component for managing file systems. It enables users to:
#### Getting Started & Installation 📄 Read: references/getting-started.md
#### File Operations (CRUD) 📄 Read: references/file-operations.md
#### Views & Navigation 📄 Read: references/views-and-navigation.md
#### Flat Data Structure 📄 Read: references/flat-data.md
#### Multiple Selection & Range Selection 📄 Read: references/multiple-selection.md
#### Preselect Items 📄 Read: references/preselect-the-items.md
#### Virtualization & Performance 📄 Read: references/virtualization.md
#### Drag-and-Drop Features 📄 Read: references/drag-and-drop.md
#### Customization & Styling 📄 Read: references/customization.md
#### Adding Custom Item to Context Menu 📄 Read: references/adding-custom-item-to-context-menu.md
#### Adding Custom Item to Toolbar 📄 Read: references/adding-custom-item-to-toolbar.md
#### Enable/Disable Toolbar Item 📄 Read: references/enable-disable-toolbar-item.md
#### Customize Custom Thumbnail 📄 Read: references/customize-custom-thumbnail.md
#### Customize Navigation Pane 📄 Read: references/customize-navigation-items.md
#### Nested Items 📄 Read: references/nested-items.md
#### Access Control 📄 Read: references/access-control.md
#### Pass Custom Value to Server 📄 Read: references/pass-custom-value-to-server.md
#### Accessibility & Localization 📄 Read: references/accessibility-localization.md
#### Advanced Features 📄 Read: references/advanced-features.md
import React from 'react';
import { FileManagerComponent, Inject, DetailsView, NavigationPane, Toolbar } from '@syncfusion/ej2-react-filemanager';
import '@syncfusion/ej2-base/styles/material.css';
import '@syncfusion/ej2-icons/styles/material.css';
import '@syncfusion/ej2-inputs/styles/material.css';
import '@syncfusion/ej2-popups/styles/material.css';
import '@syncfusion/ej2-buttons/styles/material.css';
import '@syncfusion/ej2-splitbuttons/styles/material.css';
import '@syncfusion/ej2-navigations/styles/material.css';
import '@syncfusion/ej2-layouts/styles/material.css';
import '@syncfusion/ej2-grids/styles/material.css';
import '@syncfusion/ej2-react-filemanager/styles/material.css';
function App() {
const hostUrl = "url";
return (
<div>
<FileManagerComponent
id="file"
ajaxSettings={{
url: hostUrl + "api/FileManager/FileOperations",
getImageUrl: hostUrl + "api/FileManager/GetImage",
uploadUrl: hostUrl + "api/FileManager/Upload",
downloadUrl: hostUrl + "api/FileManager/Download"
}}
view="Details"
height="375px"
>
<Inject services={[DetailsView, NavigationPane, Toolbar]} />
</FileManagerComponent>
</div>
);
}
export default App;The File Manager provides programmatic methods to control operations:
| Method | Parameters | Purpose |
|---|---|---|
selectAll() | - | Select all files and folders in current path |
clearSelection() | - | Deselect all items |
getSelectedFiles() | - | Get array of selected file objects |
| Method | Parameters | Purpose |
|---|---|---|
createFolder(name?) | name: string (optional) | Create new folder; opens dialog if name not provided |
renameFile(id?, name?) | id: string, name: string | Rename file/folder; opens dialog if params not provided |
deleteFiles(ids?) | ids: string[] | Delete files/folders; opens confirmation if not provided |
openFile(id) | id: string | Open file or navigate to folder |
downloadFiles(ids?) | ids: string[] (optional) | Download selected files; downloads selection if not provided |
uploadFiles() | - | Open file upload dialog |
| Method | Parameters | Purpose |
|---|---|---|
refreshFiles() | - | Refresh current folder contents |
refreshLayout() | - | Refresh component layout |
traverseBackward() | - | Navigate to parent directory |
filterFiles(filterData?) | filterData: Object | Apply custom filter to displayed files |
| Method | Parameters | Purpose |
|---|---|---|
disableToolbarItems(items) | items: string[] | Disable specific toolbar buttons |
enableToolbarItems(items) | items: string[] | Enable specific toolbar buttons |
getToolbarItemIndex(item) | item: string | Get toolbar item position |
disableMenuItems(items) | items: string[] | Disable context menu items |
enableMenuItems(items) | items: string[] | Enable context menu items |
getMenuItemIndex(item) | item: string | Get context menu item position |
| Method | Parameters | Purpose |
|---|---|---|
closeDialog() | - | Close any open dialog |
| Method | Parameters | Purpose |
|---|---|---|
destroy() | - | Clean up component resources |
File Manager provides comprehensive event hooks for customization:
| Event | Args | Triggered When |
|---|---|---|
fileSelection | FileSelectionEventArgs | File/folder about to be selected (cancelable) |
fileSelect | FileSelectEventArgs | File/folder is selected/unselected |
| Event | Args | Triggered When |
|---|---|---|
fileOpen | FileOpenEventArgs | File/folder about to be opened |
fileLoad | FileLoadEventArgs | File/folder item is rendered |
| Event | Args | Triggered When |
|---|---|---|
beforeFolderCreate | FolderCreateEventArgs | Folder creation requested (cancelable) |
folderCreate | FolderCreateEventArgs | Folder successfully created |
beforeRename | RenameEventArgs | Rename operation requested (cancelable) |
rename | RenameEventArgs | File/folder successfully renamed |
beforeDelete | DeleteEventArgs | Deletion requested (cancelable) |
delete | DeleteEventArgs | File/folder successfully deleted |
beforeMove | MoveEventArgs | Move/copy operation started |
move | MoveEventArgs | File/folder successfully moved/copied |
| Event | Args | Triggered When |
|---|---|---|
fileDragStart | FileDragEventArgs | Drag operation begins |
fileDragging | FileDragEventArgs | Dragging is in progress |
fileDragStop | FileDragEventArgs | Drag about to be dropped (cancelable) |
fileDropped | FileDragEventArgs | File/folder successfully dropped |
| Event | Args | Triggered When |
|---|---|---|
uploadListCreate | UploadListCreateArgs | Upload UI created (pre-upload validation) |
beforeDownload | BeforeDownloadEventArgs | Download requested |
| Event | Args | Triggered When |
|---|---|---|
menuOpen | MenuOpenEventArgs | Context menu about to open |
menuClose | MenuCloseEventArgs | Context menu closed |
menuClick | MenuClickEventArgs | Context menu item clicked |
| Event | Args | Triggered When |
|---|---|---|
search | SearchEventArgs | User types in search box |
beforePopupOpen | BeforePopupOpenCloseEventArgs | Dialog about to open |
popupOpen | PopupOpenCloseEventArgs | Dialog opened |
beforePopupClose | BeforePopupOpenCloseEventArgs | Dialog about to close |
popupClose | PopupOpenCloseEventArgs | Dialog closed |
| Event | Args | Triggered When |
|---|---|---|
beforeSend | BeforeSendEventArgs | AJAX request sent (add custom headers) |
success | SuccessEventArgs | AJAX request succeeded |
failure | FailureEventArgs | AJAX request failed |
beforeImageLoad | BeforeImageLoadEventArgs | Image/thumbnail request sent |
| Event | Args | Triggered When |
|---|---|---|
created | Object | Component initialization complete |
destroyed | Object | Component destroyed |
| Event | Args | Triggered When |
|---|---|---|
toolbarCreate | ToolbarCreateEventArgs | Toolbar being created |
toolbarClick | ToolbarClickEventArgs | Toolbar button clicked |
import React from 'react';
import { FileManagerComponent, Inject, DetailsView, NavigationPane, Toolbar } from '@syncfusion/ej2-react-filemanager';
import '@syncfusion/ej2-react-filemanager/styles/material.css';
export default function BasicFileManager() {
return (
<FileManagerComponent
id="file"
ajaxSettings={{
url: "url",
getImageUrl: "url",
uploadUrl: "url",
downloadUrl: "url"
}}
view="Details"
height="500px"
>
<Inject services={[DetailsView, NavigationPane, Toolbar]} />
</FileManagerComponent>
);
}Setup Steps:
@syncfusion/ej2-react-filemanager and all peer dependenciesajaxSettings endpointsExpected Endpoint Structure:
ajaxSettings={{
url: "url",
getImageUrl: "url",
uploadUrl: "url",
downloadUrl: "url"
}}Backend Implementation (ASP.NET Core Example):
[ApiController]
[Route("api/[controller]")]
public class FileManagerController : ControllerBase
{
[HttpPost("FileOperations")]
public IActionResult FileOperations(
[FromForm] string action,
[FromForm] string path,
[FromForm] string name = null,
[FromForm] IFormFile uploadFiles = null)
{
switch (action)
{
case "read":
// Return files and folders at given path
return Ok(new { files = GetDirectoryContents(path) });
case "create":
// Create new folder
Directory.CreateDirectory(Path.Combine(path, name));
return Ok();
case "delete":
// Delete files/folders
return Ok();
case "rename":
// Rename file/folder
return Ok();
case "move":
// Move or copy files
return Ok();
default:
return BadRequest("Invalid action");
}
}
[HttpGet("GetImage")]
public IActionResult GetImage([FromQuery] string path)
{
// Return thumbnail or image file
var filePath = ResolvePath(path);
return PhysicalFile(filePath, "image/jpeg");
}
[HttpPost("Upload")]
public IActionResult Upload([FromForm] IFormFile uploadFiles, [FromForm] string path)
{
// Handle file upload
var filePath = Path.Combine(path, uploadFiles.FileName);
using (var stream = new FileStream(filePath, FileMode.Create))
{
uploadFiles.CopyTo(stream);
}
return Ok();
}
[HttpGet("Download")]
public IActionResult Download([FromQuery] string path)
{
// Return file for download
var file = System.IO.File.ReadAllBytes(path);
var fileName = Path.GetFileName(path);
return File(file, "application/octet-stream", fileName);
}
}import React, { useRef, useState } from 'react';
export default function FileManagerWithState() {
const fileManagerRef = useRef(null);
const [selectedFiles, setSelectedFiles] = useState([]);
const [currentPath, setCurrentPath] = useState('/');
const handleFileSelect = (args) => {
setSelectedFiles(args.fileDetails);
};
const handleCreateFolder = () => {
fileManagerRef.current?.createFolder('NewFolder');
};
const handleDeleteSelected = () => {
const ids = selectedFiles.map(f => f.name);
fileManagerRef.current?.deleteFiles(ids);
};
return (
<div>
<div className="toolbar">
<button onClick={handleCreateFolder}>Create Folder</button>
<button onClick={handleDeleteSelected} disabled={!selectedFiles.length}>
Delete ({selectedFiles.length})
</button>
<span>Path: {currentPath}</span>
</div>
<FileManagerComponent
ref={fileManagerRef}
fileSelect={handleFileSelect}
ajaxSettings={{...}}
height="400px"
>
<Inject services={[DetailsView, NavigationPane, Toolbar]} />
</FileManagerComponent>
</div>
);
}<FileManagerComponent
// Prevent deletion of certain files
beforeDelete={(args) => {
if (args.fileDetails[0].name.startsWith('.')) {
args.cancel = true;
alert('Cannot delete system files');
}
}}
// Add headers to AJAX requests
beforeSend={(args) => {
args.headers = { ...args.headers, 'Authorization': `Bearer ${token}` };
}}
// Validate before upload
uploadListCreate={(args) => {
args.fileDetails.forEach(file => {
if (file.size > 5000000) { // 5MB limit
args.cancel = true;
}
});
}}
// Track successful operations
success={(args) => {
console.log('Operation successful:', args.action, args.result);
}}
// Handle errors
failure={(args) => {
console.error('Operation failed:', args.error);
}}
/><FileManagerComponent
// Customize toolbar
toolbarSettings={{
items: ['NewFolder', 'Upload', '|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Download'],
visible: true
}}
// Customize context menu
contextMenuSettings={{
file: ['Open', '|', 'Cut', 'Copy', '|', 'Delete', 'Rename', '|', 'Details'],
folder: ['Open', '|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Rename'],
layout: ['SortBy', 'View', 'Refresh', '|', 'NewFolder', 'Upload'],
visible: true
}}
// Customize columns in details view
detailsViewSettings={{
columns: [
{
field: 'name',
headerText: 'Name',
minWidth: 120,
template: '<span class="custom-name">${name}</span>'
},
{
field: '_fm_modified',
headerText: 'Modified',
type: 'dateTime',
format: 'MMMM dd, yyyy HH:mm',
minWidth: 120
},
{
field: 'size',
headerText: 'Size',
minWidth: 90,
template: '<span>${size}</span>'
}
]
}}
// Customize navigation pane
navigationPaneSettings={{
maxWidth: '650px',
minWidth: '240px',
visible: true,
sortOrder: 'None'
}}
/><FileManagerComponent
// Enable virtualization for large datasets
enableVirtualization={true}
// Enable persistence to maintain state
enablePersistence={true}
// Configure search settings
searchSettings={{
allowSearchOnTyping: true,
filterType: 'contains',
ignoreCase: true
}}
// Configure upload settings
uploadSettings={{
autoUpload: true,
minFileSize: 0,
maxFileSize: 30000000, // 30MB
allowedExtensions: '.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx',
autoClose: false,
directoryUpload: false,
sequentialUpload: false
}}
// Sort optimization
sortBy="name"
sortOrder="Ascending"
/>| Prop | Type | Default | Purpose |
|---|---|---|---|
ajaxSettings | Object | See below | Configure backend endpoints for file operations |
path | string | "/" | Current folder path |
view | string | "LargeIcons" | View type: "Details" or "LargeIcons" |
width | string | "100%" | Component width |
height | string | "400px" | Component height |
| Prop | Type | Default | Purpose |
|---|---|---|---|
showFileExtension | boolean | true | Display file extensions |
showHiddenItems | boolean | false | Display hidden files/folders |
showThumbnail | boolean | true | Show thumbnails in large icons view |
showItemCheckBoxes | boolean | true | Display checkboxes on hover |
sortBy | string | "name" | Sort field: "name", "dateModified", "size" |
sortOrder | string | "Ascending" | Sort direction: "Ascending", "Descending", or "None" |
enableRtl | boolean | false | Right-to-left layout support |
locale | string | "en-US" | Localization language code |
| Prop | Type | Default | Purpose |
|---|---|---|---|
allowMultiSelection | boolean | true | Allow selecting multiple files |
enableRangeSelection | boolean | false | Select multiple items by dragging mouse |
selectedItems | string[] | [] | Initially selected file names |
allowDragAndDrop | boolean | false | Enable drag-drop operations |
| Prop | Type | Default | Purpose |
|---|---|---|---|
enableVirtualization | boolean | false | Virtual scrolling for large datasets |
enablePersistence | boolean | false | Persist view, path, and selection state |
enableHtmlSanitizer | boolean | true | Sanitize HTML to prevent XSS attacks |
cssClass | string | "" | Custom CSS class for styling |
rootAliasName | string | null | Display name for root folder |
popupTarget | HTMLElement | null | Dialog popup target element |
| Prop | Type | Purpose | |
|---|---|---|---|
fileSystemData | Object[] | Flat data structure for local files | |
contextMenuSettings | Object | Customize context menu items | |
toolbarSettings | Object | Configure toolbar items and layout | |
detailsViewSettings | Object | Customize columns and column widths | |
navigationPaneSettings | Object | Configure sidebar behavior and appearance | |
searchSettings | Object | Configure search filtering options | |
uploadSettings | Object | Configure upload behavior | |
sortComparer | Function | Custom sorting function | |
largeIconsTemplate | string \ | Function | Custom template for large icons view |
navigationPaneTemplate | string \ | Function | Custom template for navigation pane |
ajaxSettings={{
url: "url", // Main CRUD endpoint (required)
getImageUrl: "url", // Thumbnail retrieval
uploadUrl: "url", // File upload endpoint
downloadUrl: "url", // File download endpoint
// Optional: Add custom headers
// headers: { 'Authorization': 'Bearer token' }
}}Backend Endpoint Expectations:
action parameter:read: List files in pathcreate: Create new folderdelete: Delete file/folderrename: Rename file/foldermove: Move/copy file (copy or cut)search: Search filesupload: Handle file uploadsdownload: Prepare downloadpath parameter for thumbnail image URLImplement a document browser with upload, download, and folder organization:
Build a gallery with image/video thumbnails:
getImageUrl for preview generationCreate an internal file management tool:
Support multiple languages and RTL:
locale to user's languageenableRtl for RTL languages~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.