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