Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ chunks = [b"part1", b"part2", b"part3", b"part4"]

def upload_part(part_number: int, data: bytes):
compressed = compressor.compress(data)
return upload.upload_part(
return upload.put_part(
compressed, part_number=part_number, content_length=len(compressed)
)

Expand Down
7 changes: 7 additions & 0 deletions clients/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,13 @@ session.put("payload")

### Multipart Upload API

> **Feature flag required:** Enable the `multipart` Cargo feature to use this API.
> It is not included in the default feature set.
>
> ```toml
> objectstore-client = { version = "...", features = ["multipart"] }
> ```

For large objects, use multipart uploads to upload parts concurrently with bounded
parallelism.

Expand Down
6 changes: 4 additions & 2 deletions objectstore-server/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ All object operations live under the `/v1/` prefix:

| Method | Path | Description |
|-----------|--------------------------------------------------------------|--------------------------------------|
| `POST` | `/v1/objects:multipart:initiate/{usecase}/{scopes}/` | Initiate upload (server-generated key) |
| `PUT` | `/v1/objects:multipart:initiate/{usecase}/{scopes}/{key}` | Initiate upload (user-provided key) |
| `POST` | `/v1/objects:multipart/{usecase}/{scopes}/` | Initiate upload (server-generated key) |
| `PUT` | `/v1/objects:multipart/{usecase}/{scopes}/{*key}` | Initiate upload (user-provided key) |
| `PUT` | `/v1/objects:multipart:parts/{usecase}/{scopes}/{key}` | Upload a part (`uploadId`, `partNumber` query params) |
| `GET` | `/v1/objects:multipart:parts/{usecase}/{scopes}/{key}` | List uploaded parts (`uploadId` query param) |
| `POST` | `/v1/objects:multipart:complete/{usecase}/{scopes}/{key}` | Complete upload (`uploadId` query param) |
| `DELETE` | `/v1/objects:multipart/{usecase}/{scopes}/{key}` | Abort upload (`uploadId` query param) |

The initiate POST endpoint accepts both trailing-slash and non-trailing-slash forms.

The complete endpoint returns `200 OK` immediately, with a streaming body that
will contain the error (if any) as JSON. Whitespace is sent in the streaming body
to keep the connection open.
Expand Down
6 changes: 6 additions & 0 deletions objectstore-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
//! into hierarchical namespaces and double as the authorization boundary checked
//! against JWT claims.
//!
//! ## Multipart
//!
//! The [`multipart`] module defines the request and response types for the
//! multipart upload protocol, which splits large objects into independently
//! uploaded parts that are assembled server-side on completion.
//!
//! ## Auth
//!
//! The [`auth`] module defines [`Permission`](auth::Permission), the set of
Expand Down
11 changes: 11 additions & 0 deletions objectstore-types/src/multipart.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
//! Types for the multipart upload protocol.
//!
//! Multipart uploads split large objects into independently uploaded parts that
//! are assembled server-side on completion. This module defines the request and
//! response types exchanged between clients and the server during each phase of
//! the protocol: initiation, part upload, part listing, and completion.
//!
//! Key types:
//! - [`UploadId`] — opaque, path-safe identifier for an in-progress upload.
//! - [`InitiateResponse`] — returned when a new upload is created.
//! - [`CompletePart`] / [`CompleteRequest`] — part manifest sent to finalize.
//! - [`PartInfo`] / [`ListPartsResponse`] — used to resume interrupted uploads.

use std::fmt;
use std::num::NonZeroU32;
Expand Down
Loading