https://github.com/alexb5dh/filebrowser
Small homemade AngularJS + Web API project
https://github.com/alexb5dh/filebrowser
angular1 aspnet4 test-assignment
Last synced: 12 months ago
JSON representation
Small homemade AngularJS + Web API project
- Host: GitHub
- URL: https://github.com/alexb5dh/filebrowser
- Owner: alexb5dh
- Created: 2016-09-29T22:17:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T15:42:26.000Z (over 9 years ago)
- Last Synced: 2025-01-04T18:18:29.631Z (about 1 year ago)
- Topics: angular1, aspnet4, test-assignment
- Language: C#
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Table of Contents
1. [Routing](#routing)
2. [Statistics](#statistics)
3. [API](#api)

# Routing

Site uses AngularJS routing for file system browsing. It greatly simplifies integration with browser history functionality (back, forward, reload) and allows to keep track of current location in address bar.
It also allows to save/copy direct link with current path. "Hashbang" is used to handle full Windows pathes with drive names.
Directory content is preloaded in route resolving stage to make sure directory is accessible and prevent navigation in case of failure.
# Statistics
Statistics (file-by-size-range counting) takes a noticable amount of time and disk throughput for large folders with tens of thousands of files. Application tries to minimize this by cancelling unnecessary calculation in case of route change.
Calculation ignore folders inaccessible due to insufficient rights and files/folders with full name exceeding 255 character limit.
# API
## Browse
`GET /browse/?path=`
Returns list of files and folders in the directory specified by `path`.
```json
{
"folders": {
"name": "",
"path": ""
},
"files": {
"name": "",
"path": ""
}
}
```
## Download
`GET /download/?path=`
Downloads the file specified by `path`.
## Statistics
`GET /statistics/?path=`
Recursively calculates files by size ranges in directory specified by `path`.
```json
{
"<= 10MB": 0,
"10MB - 50MB": 0,
">= 100MB": 0
}
```