feat: support parallel multi-file uploads
The browser upload flow was built around one selected file and one global upload state. That made the existing chunk pool useful for a single file, but users could not start several selected files at the same time. Refactor the browser state into per-file upload items. Each selected file now has its own upload record, completed-chunk set, abort controller, retry state, progress row, and saved IndexedDB resume record. The picker accepts multiple files, `Start all` and `Resume all` use a bounded file-level pool, and each file keeps the existing bounded chunk pool. This keeps parallel uploads useful without letting one large selection create unbounded request fan-out. Keep the server API unchanged. Each file still receives a separate server upload id, and server-side progress remains authoritative before any missing chunks are scheduled. Terminal conflicts still stop the affected file without overwriting completed data. Update the user-facing markup, styles, project docs, and test checklist for the multi-file scheduler. Add a server regression test that interleaves two uploads and verifies the completed files contain exactly their own bytes. Test Plan: - just check - git diff --check
This commit is contained in:
@@ -21,6 +21,8 @@ Keep this file as the reusable verification checklist while implementing
|
||||
- `GET /api/uploads/:id` reports completed chunks from disk markers.
|
||||
- `POST /api/uploads/:id/complete` renames the verified temp upload file
|
||||
and removes staging data.
|
||||
- Parallel upload requests for separate files complete without crossing
|
||||
bytes between temp upload files.
|
||||
- `POST /api/uploads/:id/complete` rejects incomplete uploads.
|
||||
- `POST /api/uploads/:id/complete` rejects tampered temp upload files.
|
||||
- `static/app.js` passes `node --check`.
|
||||
@@ -38,6 +40,8 @@ deployment retests.
|
||||
|
||||
- Upload a small file in one pass.
|
||||
- Upload a file larger than one chunk.
|
||||
- Select multiple files and confirm several upload rows advance at the same
|
||||
time.
|
||||
- Kill the browser tab mid-upload and resume.
|
||||
- Restart the Rust server mid-upload and resume.
|
||||
- Interrupt the network and resume.
|
||||
|
||||
Reference in New Issue
Block a user