Skip to content

Fix R2 Java SDK chunked encoding docs#28116

Merged
elithrar merged 1 commit intoproductionfrom
opencode/issue27054-20260205211646
Feb 6, 2026
Merged

Fix R2 Java SDK chunked encoding docs#28116
elithrar merged 1 commit intoproductionfrom
opencode/issue27054-20260205211646

Conversation

@ask-bonk
Copy link
Contributor

@ask-bonk ask-bonk bot commented Feb 5, 2026

The :::note syntax is correct and consistent with other files in the R2 docs. The changes look complete and consistent.

Here's a summary of the changes made to src/content/docs/r2/examples/aws/aws-sdk-java.mdx:

  1. Added a :::note callout explaining that chunkedEncodingEnabled(false) is required in the S3Configuration. Without this, putObject requests fail with an HTTP 403 signature mismatch error because R2 doesn't support AWS chunked transfer encoding for request signing.

  2. Added .chunkedEncodingEnabled(false) to the S3Configuration.builder() in the buildS3Client method (line 78).

  3. Added RequestBody import (software.amazon.awssdk.core.sync.RequestBody) needed for the putObject example.

  4. Added a putObject method (lines 115-129) demonstrating how to upload objects to an R2 bucket using PutObjectRequest and RequestBody.fromString().

  5. Added a putObject call in main (lines 146-149) showing the upload in action before listing objects, so users can see a complete working flow.

Closes #27054

github run

Co-authored-by: elithrar <elithrar@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/r2/ @oxyjun, @elithrar, @jonesphillip, @aninibread, @harshil1712, @cloudflare/workers-docs, @cloudflare/pcx-technical-writing

@elithrar elithrar merged commit bbf01fb into production Feb 6, 2026
12 checks passed
@elithrar elithrar deleted the opencode/issue27054-20260205211646 branch February 6, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:r2 R2 object storage: https://developers.cloudflare.com/r2 size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS S3 Java SDK does not support chunked encoding when putting objects to R2 buckets

5 participants