Large plugin packages previously uploaded through a single multipart
POST, which can exceed proxy/body-size limits and offered no progress
feedback. Add a chunked upload path alongside the existing one.
Server:
- New generic internal/uploads session Manager assembles chunks into a
pre-sized temp file via positioned writes, with TTL expiry, idempotent
chunk retries, and size validation.
- Four endpoints under /admin/plugins/uploads/chunked
(create/put-chunk/complete/cancel); completion reuses the shared
install path and sniffs the zip magic from disk instead of reading the
whole archive into memory.
Web:
- Reusable uploadFileInChunks helper with adaptive chunk-size backoff on
413, plus a usePluginUpload hook and shared Progress component driving
the upload progress bars on both admin plugin pages.
- Files at or below the chunk threshold keep using the multipart path.
- api() now respects a caller-supplied Content-Type so chunks can be
sent as application/octet-stream.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>