Commit Graph
3 Commits
Author SHA1 Message Date
eberkheevandClaude Opus 4.6 ebe5c6ec90 Refactor: fix socket leak, deduplicate stat/path logic, simplify config
- get_local_ip: use context manager to prevent socket leak
- _route_files: single stat() per file instead of two
- _safe_path helper: DRY path resolution for download/delete
- load_config: loop over vars(args) instead of 6 repetitive blocks
- Remove stale comment from index.html

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:38:53 +04:00
eberkheevandClaude Opus 4.6 266308a2eb Detect text files via MIME + binary heuristic instead of hardcoded extension list
Server-side _file_type() now uses mimetypes for images/known text,
and falls back to null-byte check on first 8KB for everything else.
Client uses the "type" field from /files API instead of local extension sets.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:35:16 +04:00
eberkheevandClaude Opus 4.6 eba5ece147 Initial commit
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:23:55 +04:00