cloudflare-go icon indicating copy to clipboard operation
cloudflare-go copied to clipboard

R2: S3.PutObject non-workable against Cloudflare R2

Open karalabe opened this issue 8 months ago • 1 comments

Confirm this is a Go library issue and not an underlying Cloudflare API issue

  • [x] This is an issue with the Go library

Describe the bug

This is a bit of a weird bug report because I'm not sure who to blame.

If I try to upload a larger object with github.com/aws/aws-sdk-go-v2/service/s3.PutObject. Using v1.72.3 works perfectly. Anything newer and it just loops indefinitely, never finishing the upload.

There is a a compatibility note in https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/, it does not fix it. Any version newer than v1.72.3 chokes on R2.

To Reproduce

Call s3.PutObject with anything larger than a few megabytes using v1.77.1

Code snippets


OS

macOS

Go version

Go 1.24.0

Library version

github.com/cloudflare/cloudflare-go/v4 v4.1.0

karalabe avatar Feb 26 '25 20:02 karalabe