Unable to upload to R2 with .NET S3 SDK

I’m using the official S3 SDK for .NET., setting ForcePathStyle to true so that it works with R2’s addressing scheme.

There’s nothing special about the upload call

client.PutObjectAsync(new PutObjectRequest()
    BucketName = bucket,
    Key = key,
    InputStream = stream,
    AutoCloseStream = false

This works both for Minio and Scaleway’s object storage. With R2, I get this exception

System.AggregateException: One or more errors occurred. (STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented)
 ---> Amazon.S3.AmazonS3Exception: STREAMING-AWS4-HMAC-SHA256-PAYLOAD not implemented
 ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.

I’ve also tried to set DisablePayloadSigning to true. The upload succeeded, but then download fails, even via CF’s bucket GUI.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.