A modern, full-featured file manager component for ASP.NET Core applications. Built from scratch without external dependencies, featuring a beautiful Bootstrap 5-based UI with comprehensive file management capabilities.
- ✅ Full File Operations - Create, rename, delete, copy, and move files and folders
- ✅ File Upload - Drag-and-drop support with progress tracking
- ✅ File Download - Download single files or multiple files as ZIP archive
- ✅ ZIP Operations - Create ZIP archives and extract ZIP files
- ✅ Image Preview - Built-in modal viewer for image files
- ✅ Search - Fast file and folder search with case-sensitive option
- ✅ Breadcrumb Navigation - Easy navigation through folder hierarchy
- ✅ Toolbar - Quick access to common operations
- ✅ Navigation Pane - Tree view of folder structure
- ✅ Multiple Views - Switch between Large Icons and Details view
- ✅ Context Menu - Right-click menu for quick actions
- ✅ Sortable Columns - Sort files by name, date, type, or size
- ✅ Multi-Selection - Select and operate on multiple files at once
- ✅ State Persistence - Remember view mode and path on page reload
- ✅ RTL Support - Full right-to-left layout for Arabic/Persian/Hebrew
- ✅ Responsive Design - Works perfectly on desktop, tablet, and mobile
- ✅ Dark Mode - Automatic dark mode support
- ✅ Extensible - Easy to customize and extend
Install-Package AspNetCoreFileManagerdotnet add package AspNetCoreFileManagerusing AspNetCoreFileManager.Extensions;
var builder = WebApplication.CreateBuilder(args);
// Configure File Manager service
var filesPath = Path.Combine(builder.Environment.ContentRootPath, "Files");
builder.Services.AddFileManager(filesPath);
builder.Services.AddControllersWithViews();
var app = builder.Build();
app.UseStaticFiles();
app.UseRouting();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();<!-- In your _Layout.cshtml -->
<head>
<!-- Bootstrap 5 (required) -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome (required for icons) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- File Manager CSS -->
<link rel="stylesheet" href="~/lib/aspnetcorefilemanager/css/filemanager.css">
</head>
<body>
<!-- Your content -->
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<!-- File Manager JS (Merged: core + events + utils + zip + destroy) -->
<script src="~/lib/aspnetcorefilemanager/js/filemanager.js"></script>
<!-- Optional: File Manager i18n (only if you need localization) -->
<script src="~/lib/aspnetcorefilemanager/js/filemanager-i18n.js"></script>
</body><!-- Simple usage with Tag Helper -->
<file-manager id="myFileManager" path="/" view="largeicons"></file-manager>That's it! You now have a fully functional file manager.
Choose the installation method that works best for you:
- QUICK_START_VS.md - Fast setup with Visual Studio
- VISUAL_STUDIO_INSTALLATION_GUIDE.md - Complete Visual Studio guide
- Add local package source
- Install via Package Manager
- Build and verify
- Troubleshooting tips
- MANUAL_INSTALLATION.md - ⭐ NEW! Complete manual setup guide
- Copy CSS/JS files without NuGet
- PowerShell and Bash scripts included
- Project reference setup (source + DLL)
- Update scripts with backup
- Perfect for customization and development
- CHANGELOG.md - Complete version history and changes
- docs/MIGRATION_v1.0.5.md - Migrate from v1.0.4 to v1.0.5 (merged JS files)
- docs/features/ZIP_OPERATIONS.md - ZIP creation and extraction guide
- docs/guides/LOCALIZATION.md - Multi-language support (English/Persian)
- docs/guides/NUGET_PACKAGE.md - Package creation and publishing guide
- docs/TROUBLESHOOTING.md - Common issues and solutions
- docs/README.md - Complete documentation index
- PACKAGE_WORKING_v1.0.7.md - Latest package status and test results
- TEST_FIXES_SUMMARY.md - Recent test fixes and improvements
- test-package-install.ps1 - Automated testing script
- README_FA.md - Complete Persian documentation (مستندات فارسی)
The easiest way to use the file manager is with the Tag Helper:
<file-manager
id="myFileManager"
path="/Documents"
view="details"
height="600px"
allow-drag-drop="true"
allow-multi-selection="true"
show-toolbar="true"
show-navigation="true"
show-context-menu="true"
enable-persistence="true"
enable-rtl="false">
</file-manager>For more control, you can create instances programmatically:
var fileManager = new FileManager('#myElement', {
path: '/Documents',
view: 'largeicons',
allowDragAndDrop: true,
allowMultiSelection: true,
showFileExtension: true,
showHiddenItems: false,
enablePersistence: true,
enableRtl: false,
ajaxSettings: {
url: '/api/FileManager/FileOperations',
uploadUrl: '/api/FileManager/Upload',
downloadUrl: '/api/FileManager/Download',
getImageUrl: '/api/FileManager/GetImage'
},
toolbarSettings: {
visible: true,
items: ['NewFolder', 'Upload', 'Delete', 'Download', 'Rename', 'Refresh', 'View', 'Details']
},
navigationPaneSettings: {
visible: true,
minWidth: '200px',
maxWidth: '400px'
},
contextMenuSettings: {
visible: true,
items: ['Open', '|', 'Cut', 'Copy', 'Paste', 'Delete', 'Rename', '|', 'Details']
}
});
// Event handlers
fileManager.on('success', function(e) {
console.log('Operation succeeded:', e);
});
fileManager.on('failure', function(e) {
console.error('Operation failed:', e);
});| Option | Type | Default | Description |
|---|---|---|---|
path |
string | "/" | Initial path to display |
view |
string | "largeicons" | View mode: "largeicons" or "details" |
allowDragAndDrop |
bool | true | Enable drag-and-drop upload |
allowMultiSelection |
bool | true | Allow multiple file selection |
showFileExtension |
bool | true | Show file extensions |
showHiddenItems |
bool | false | Show hidden files |
showThumbnail |
bool | true | Show image thumbnails |
enablePersistence |
bool | false | Save state on reload |
enableRtl |
bool | false | Enable RTL layout |
See the full API reference for all options.
You can override the default styles by adding your own CSS:
/* Custom toolbar background */
.filemanager-toolbar {
background-color: #your-color;
}
/* Custom file item hover color */
.file-item:hover {
background-color: #your-color;
}Implement your own file provider for cloud storage or database:
public class AzureBlobFileManagerService : IFileManagerService
{
// Implement all interface methods
// Use Azure Blob Storage instead of physical file system
public FileManagerResponse GetFiles(string path, bool showHiddenItems = false, string[]? filter = null)
{
// Your Azure Blob Storage implementation
}
// ... other methods
}
// Register in Program.cs
builder.Services.AddFileManager<AzureBlobFileManagerService>();- ✅ Chrome (latest)
- ✅ Firefox (latest)
- ✅ Safari (latest)
- ✅ Edge (latest)
- ✅ Mobile browsers (iOS Safari, Chrome Mobile)
dotnet test<file-manager
id="minimal"
show-toolbar="false"
show-navigation="false"
show-context-menu="false">
</file-manager><file-manager
id="rtl"
enable-rtl="true"
path="/">
</file-manager><file-manager
id="persistent"
enable-persistence="true"
path="/Documents">
</file-manager>AspNetCoreFileManager/
├── src/
│ └── AspNetCoreFileManager/ # Main library
│ ├── Controllers/ # API controllers
│ ├── Models/ # Data models
│ ├── Services/ # Business logic
│ ├── TagHelpers/ # Tag helper implementation
│ ├── Extensions/ # Service extensions
│ └── wwwroot/ # Static assets
│ ├── css/ # Stylesheets
│ │ └── filemanager.css
│ ├── js/ # JavaScript files
│ │ ├── filemanager.js # Main JS (merged: core + events + utils + zip + destroy)
│ │ └── filemanager-i18n.js # Optional: Localization
│ └── locales/ # Translation files
│ ├── en.json # English translations
│ └── fa.json # Persian translations
├── samples/
│ └── AspNetCoreFileManager.Demo/ # Demo application
├── tests/
│ └── AspNetCoreFileManager.Tests/ # Unit tests
├── docs/ # Documentation
└── README.md
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with ASP.NET Core 8.0
- UI design inspired by modern file managers
- Icons by Font Awesome
- Styling with Bootstrap 5
- 📧 Email: support@example.com
- 🐛 Issues: GitHub Issues
- 📖 Documentation: Full Documentation
- Azure Blob Storage provider
- AWS S3 provider
- File versioning
- File sharing and permissions
- Bulk operations progress bar
- File preview for more types (PDF, Office docs)
- Video player integration
- Audio player integration
Made with ❤️ for the ASP.NET Core community