# filecontrol **Repository Path**: leetcodexu/filecontrol ## Basic Information - **Project Name**: filecontrol - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-03-26 - **Last Updated**: 2026-03-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # GeoEnvData File Manager A FastAPI app to browse files under `/wtx_data/GeoEnvData/rawData` (configurable), with login, directory navigation, search/filter/sort, pagination and downloads. Mobile-friendly UI. ## Requirements - Python 3.9+ ## Setup ```bash python -m venv .venv source .venv/bin/activate # Windows PowerShell: .venv\Scripts\Activate.ps1 pip install -r requirements.txt ``` ## Configuration (env vars) - `DATA_ROOT` (default: `/wtx_data/GeoEnvData/rawData`) - `AUTH_USERNAME` (default: `admin`) - `AUTH_PASSWORD` (default: `admin123` or set to bcrypt hash starting with `$2b$`) - `SESSION_SECRET` (default: `change-this-secret`) - `SESSION_COOKIE_NAME` (default: `gf_session`) - `SESSION_TTL_SECONDS` (default: `86400`) Example (Linux): ```bash export DATA_ROOT=/wtx_data/GeoEnvData/rawData export AUTH_USERNAME=admin export AUTH_PASSWORD=StrongPassw0rd! export SESSION_SECRET=$(openssl rand -hex 32) ``` ## Run (development) ```bash uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload ``` Open `http://localhost:8000`. ## Features - Login/logout with secure signed session cookie - Directory browsing with breadcrumbs - Toggle recursive search; filter by `q` (substring) and `ext` list - Sort by name/size/mtime; pagination; download files securely (path validation) ## API - GET `/api/files/browse?subdir=&sort_by=&order=` → list subdirectories and files at current level - GET `/api/files/list?q=&ext=&sort_by=&order=&subdir=&page=&page_size=&recursive=` → paginated file results - GET `/api/files/download?relpath=...` → download file (within `DATA_ROOT`) ## Notes - Use strong secrets and credentials in production. - Large trees: prefer narrowing by `subdir`, `q`, `ext`, and disable `recursive` if needed.