Commit
perf: optimize multi-file uploads with batch initiate
Commit details
Commit notes
- Add batch initiate endpoint (/uploads/batch/initiate) that creates multiple upload sessions in a single API call - Update frontend uploadFiles() to use batch initiate for multi-file uploads, reducing N API calls to 1 - Add batch storage check before upload batch (saves 1 round-trip per file) - Increase file upload concurrency from 4 to 6 - Add preInitiatedSession option to uploadFile() to skip individual initiation
For a 9-file upload, this reduces: - Storage checks: 9 calls → 1 call - Initiate calls: 9 calls → 1 call - Total saved: ~16 API round-trips
This should noticeably improve upload latency for small file packs.
Co-authored-by: armin.naimi <[email redacted]>
- Files changed
- 2
- Lines added
- +399
- Lines removed
- −22