Add authenticated upload server with safe path handling and UI #1

Merged
Copilot merged 4 commits from copilot/add-nodejs-file-upload-server into master 2026-04-30 10:25:06 +03:00
Copilot commented 2026-04-30 10:24:40 +03:00 (Migrated from github.com)

Create a simple Express-based upload server for pushing songs/lyrics to a Navidrome host without SSH/FTP. The server should authenticate with a hardcoded env password, auto-create a destination config file, support folder trees under a base path, and expose a minimal UI.

  • Server foundation
    • Initialized Node/Express project with dependencies and start script
    • Added basic upload endpoint and UI page
  • Configuration & auth
    • Auto-creates destination path config file and validates absolute base path
    • Enforces env-based password auth
  • Safe filesystem handling
    • Constrains uploads to configured base path with validated subdirectories
    • Adds filename validation, rate limiting, and hardened error responses

Example request:

curl -X POST \
  -H "x-upload-password: your-strong-password" \
  -H "x-upload-subdir: rock/2024" \
  -F "file=@song.mp3" \
  http://localhost:3000/upload
Create a simple Express-based upload server for pushing songs/lyrics to a Navidrome host without SSH/FTP. The server should authenticate with a hardcoded env password, auto-create a destination config file, support folder trees under a base path, and expose a minimal UI. - **Server foundation** - Initialized Node/Express project with dependencies and start script - Added basic upload endpoint and UI page - **Configuration & auth** - Auto-creates destination path config file and validates absolute base path - Enforces env-based password auth - **Safe filesystem handling** - Constrains uploads to configured base path with validated subdirectories - Adds filename validation, rate limiting, and hardened error responses Example request: ```bash curl -X POST \ -H "x-upload-password: your-strong-password" \ -H "x-upload-subdir: rock/2024" \ -F "file=@song.mp3" \ http://localhost:3000/upload ```
Sign in to join this conversation.
No description provided.