A lightweight, browser-based file management application built with ASP.NET Core Web API and JavaScript.
- Browse files and folders with counts and sizes.
- Upload and download files directly from the browser.
- Create new folders.
- Delete files and folders.
- Search files with a live search input.
- Deep-linkable URLs to navigate directly to folders.
- Handles edge cases like files with spaces or parentheses.
- File size validation (100MB max).
- Proof of concept unit tests.
- .NET 8.0 SDK or newer
- Modern browser (Chrome, Edge, Firefox, etc.)
- Optional: Visual Studio 2022, VS Code, or Rider
- Clone the repository:
bash
git clone <repo-url>
cd FileBrowser
- Build and run:
dotnet restore
dotnet build
dotnet run
- Open a browser to:
- Click the "Open File Browser" button to open modal.
- Use the breadcrumbs to navigate folders.
- Click "Choose File" and then the Upload button to select a file to upload.
- Click "New Folder" to add a new folder.
- Click the Delete (🗑️) icon to remove a file or folder.
- Use the search input to filter files (search results show folder locations in the table).
- Click download icons to download files.
FileBrowser/
├─ Controllers/ # API controllers
├─ Services/ # FileService for browsing, uploading, deleting
├─ Models/ # FileItem and DirectoryListing
├─ Config/ # FileBrowserOptions
├─ wwwroot/ # SPA HTML/CSS/JS
├─ Program.cs # App entry point
└─ appsettings.json
FileBrowser.Tests/
- Uploads are limited to 100MB per file.
- Deep links work with folder paths in the URL.
- Search is limited to 100 results for performance.
- Invalid paths are blocked (prevents escaping the storage root).