Skip to content

Add doc example for multipart upload to GoogleCloudStorage::create_multipart#803

Open
alamb wants to merge 1 commit into
apache:mainfrom
alamb:doc-example-create-multipart-gcs
Open

Add doc example for multipart upload to GoogleCloudStorage::create_multipart#803
alamb wants to merge 1 commit into
apache:mainfrom
alamb:doc-example-create-multipart-gcs

Conversation

@alamb

@alamb alamb commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

The low-level MultipartStore API had no worked example showing the full create_multipartput_partcomplete_multipart flow. This adds one for Google Cloud Storage, mirroring the S3 example in #801.

What changes are included in this PR?

  • A runnable (no_run) doc example on GoogleCloudStorage::create_multipart showing the full low-level flow.
  • Documentation

Are there any user-facing changes?

Documentation only. No API changes.

…ltipart

Add a runnable (`no_run`) example on the `MultipartStore` impl for
`GoogleCloudStorage` showing the full low-level flow: `create_multipart`,
`put_part` for each part, and `complete_multipart` to finalize.

Also link to the example from `MultipartStore::create_multipart` so it
is discoverable from the trait definition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alamb alamb added the documentation Improvements or additions to documentation label Jul 10, 2026

@kevinjqliu kevinjqliu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, slight nit on the the documentation for gcs multipart upload limits

Comment thread src/gcp/mod.rs
/// [`ObjectStoreExt::put_multipart`]: crate::ObjectStoreExt::put_multipart
/// [`complete_multipart`]: MultipartStore::complete_multipart
/// [`abort_multipart`]: MultipartStore::abort_multipart
/// [Cloud Storage multipart upload limits]: https://cloud.google.com/storage/docs/multipart-uploads

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// [Cloud Storage multipart upload limits]: https://cloud.google.com/storage/docs/multipart-uploads
/// [Cloud Storage multipart upload limits]: https://docs.cloud.google.com/storage/docs/xml-api/post-object-complete

nit i find this page to be more useful: https://docs.cloud.google.com/storage/docs/xml-api/post-object-complete

it explicitly states the limitation about 5mib

If one of the parts specified in the request is less than 5 MiB and is not the final part in the upload, you get a 400 Bad Request status code and the body of the error response has InvalidArgument in the Code element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants