Commit Graph

2 Commits

Author SHA1 Message Date
a9d816717f Fix race condition in chunked upload for parallel uploads
- Add BEGIN IMMEDIATE transaction to add_chunk() function
- Prevents concurrent chunk uploads from overwriting each other
- Fixes issue where parallel uploads would lose chunks in database
- Critical for supporting 2+ parallel chunk uploads on mobile
2025-12-27 21:27:13 -05:00
872ae74668 Migrate storage from JSON to SQLite with enhanced MVC architecture
- Replace JSON file storage with SQLite database for improved concurrency and data integrity
- Implement repository pattern with dedicated model layer (admin_model, file_model, chunk_model)
- Add database.py with automatic migration from existing JSON files
- Enable WAL mode for thread-safe concurrent access across Gunicorn workers
- Store database files in dedicated db/ folder
- Update controllers to use model layer instead of direct JSON access
- Add admin authentication system with TOTP 2FA support
2025-12-27 14:00:39 -05:00