Skip to content

feat(server): Add Resumable Upload API - #593

Draft
jan-auer wants to merge 14 commits into
mainfrom
feat/resumable-upload-api
Draft

feat(server): Add Resumable Upload API#593
jan-auer wants to merge 14 commits into
mainfrom
feat/resumable-upload-api

Conversation

@jan-auer

@jan-auer jan-auer commented Aug 6, 2026

Copy link
Copy Markdown
Member

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

@linear-code

linear-code Bot commented Aug 6, 2026

Copy link
Copy Markdown

FS-470

@codecov

This comment has been minimized.

@lcian

This comment has been minimized.

Comment thread objectstore-types/src/resumable.rs Outdated
Comment thread objectstore-server/src/endpoints/resumable.rs Outdated
Comment thread objectstore-server/src/endpoints/resumable.rs Outdated
@lcian lcian changed the title feat(server): Add resumable upload API feat(server): Add Resumable Upload API Aug 27, 2026
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
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.
@lcian

This comment has been minimized.

Comment thread objectstore-server/src/endpoints/resumable.rs Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

lcian added 4 commits August 28, 2026 14:28
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.
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.
@lcian

This comment has been minimized.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

lcian added 6 commits August 28, 2026 15:58
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants