feat(server): Add Resumable Upload API - #593
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Encode opaque session tokens as canonical unpadded base64url at the API boundary. Remove Location construction and its OriginalUri plumbing. Return HTTP 501 when the selected backend declines resumable uploads. Allow wildcard offset queries without Content-Length and verify their bodies are empty. Reject wildcard requests carrying payload bytes with HTTP 400. Update protocol documentation and endpoint tests for the revised wire behavior. Refs FS-470
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0c6f8f3. Configure here.
Route query-selected object operations through dedicated Axum handlers. Give each operation a focused extractor set. Model resumable selection as an optional target. Forward decoded session tokens through request extensions to avoid parsing them twice. Align endpoint and service terminology for object insertion and upload cancellation. Update backend hooks, response types, telemetry labels, documentation, and tests.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 0df3274. Configure here.
Parse resumable query parameters synchronously from the request URI and return ApiError from route classification. This keeps response rendering in the dispatchers and avoids carrying a large Response in the Result error variant.
Reject Upload-Offset: * requests immediately when Content-Length declares a non-empty body. Continue inspecting the body stream so chunked or otherwise undeclared payloads are also rejected.
Render range and resumable offset errors through ApiError so their status, protocol headers, and response bodies are defined in one place. Let object and resumable endpoints propagate the structured service errors directly.
Reject bodies on session creation through shared empty-body validation, and treat unsupported functionality as a routine debug-level outcome. Clarify that session tokens are opaque, chunks require a declared length over HTTP/2, and fully uploaded sessions must commit or return an error.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 69a0db5. Configure here.
Implement ResumableTarget as an optional Axum parts extractor so dispatch handlers receive the classified target directly. Keep the loose query representation private and pass only existing session tokens through request extensions.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a53faae. Configure here.
Build unsatisfiable range responses in the object endpoint and attach authoritative offsets in the resumable continuation path. Keep generic ApiError conversion free of operation-specific response headers.
Reparse and validate session tokens in continuation and cancellation leaf handlers, removing the request-extension handoff. Keep route classification as a marker and return the regular delete status directly through IntoResponse.
Remove service-side token validation and let backends decide whether a token identifies an upload session. Split the catch-all request error into unknown-session and structured chunk-length outcomes.
Implements the Resumable Upload interface on the backend trait and the API endpoints.
By default, all backends decline with
501 Not Implemented.Spec
Close FS-470