feat(server): Add multipart upload endpoints#463
Merged
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
lcian
commented
May 8, 2026
lcian
commented
May 8, 2026
| headers: HeaderMap, | ||
| ) -> ApiResult<Response> { | ||
| let mut metadata = Metadata::from_headers(&headers, "").map_err(ServiceError::from)?; | ||
| // TODO: Do this in `complete` instead, when we have a Service API to mutate metadata. |
Member
Author
There was a problem hiding this comment.
This is easy to do but we would need a new method on Backend, plus all the implementations and plumbing through Service, filed a follow-up: https://linear.app/getsentry/issue/FS-356/set-correct-metadatatime-created-for-multipart-uploads.
Or, we can just accept and document that time_created refers to the time the upload was initiated, but that sounds wrong, it should probably be the time the logical object is created, which is the time the multipart upload is completed.
lcian
commented
May 8, 2026
409be20 to
d6eb979
Compare
5babbfb to
c33ba6f
Compare
This comment was marked as spam.
This comment was marked as spam.
matt-codecov
approved these changes
May 22, 2026
ab5d578 to
a2496b3
Compare
Validate that upload_id contains only normal path components before joining it into the multipart directory path. Rejects segments containing .., /, or other traversal patterns.
Replace `type UploadId = String` with a newtype struct that validates on construction: non-empty and no path-traversal components (.., /, \). This moves the path-safety guarantee from LocalFsBackend's safe_join helper to the type itself, protecting all backends. Invalid upload_id values in query params are now rejected at deserialization time (400).
lcian
added a commit
that referenced
this pull request
May 29, 2026
⚠️ Stacked on #463 Implements a multipart upload API for the Rust client. Instead of going for a low-level API where calls match exactly HTTP calls as I've planned initially, I've decided to abstract some things, for example, initiating a multipart upload returns a `MultipartUpload` that represents it, much like the existing `Session` we have. Please look at the README to see the intended usage. Also makes a couple changes that aren't strictly related to the multipart upload impl: - Moves multipart upload-related types from `objectstore-server` to `objectstore-types`, to make them usable from the client too, given that they both deal with the wire format. - Makes the server return a vec of completed parts, each with their own `part_number` when calling `ListParts`, as opposed to a `BTreeMap`. - Makes `Usecase::compression` take an `Option<Compression>`. This is a breaking change that makes it possible to disable default-compression on a usecase, which wasn't possible before. Close FS-357 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final part of the Multipart uploads implementation server-side, this implements the endpoints on top of the Service.
Close FS-341
Close FS-359