Skip to content

rebeccamadsen/FileBrowserSPA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Browser SPA

A lightweight, browser-based file management application built with ASP.NET Core Web API and JavaScript.

Features

  • 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.

Requirements

  • .NET 8.0 SDK or newer
  • Modern browser (Chrome, Edge, Firefox, etc.)
  • Optional: Visual Studio 2022, VS Code, or Rider

Setup

  1. Clone the repository:
bash
git clone <repo-url>
cd FileBrowser
  1. Build and run:
dotnet restore
dotnet build
dotnet run
  1. Open a browser to:

https://localhost:7146

Usage

  • 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.

Folder Structure

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/

Notes

  • 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).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors