Problem:
- Files could not be clicked (error: no location)
- get_file_info used hardcoded demo database
- file_locations table was empty
Solution:
1. Scan now inserts file_locations records
- file_uuid = node_id (temporary)
- location = file path (from aliases)
- label = origin
2. Modified API routes to include user_id
- /api/v2/files/:user_id/:file_uuid/info
- /api/v2/files/:user_id/:file_uuid/stream
3. Modified showDetail() to use tree_user from localStorage
Result:
- file_locations: 11857 records ✅
- Files can be clicked ✅
- API uses correct user database ✅
Files:
- src/scan.rs (insert file_locations)
- src/server.rs (user_id parameter)
- src/page.html (showDetail with user_id)