Skip to content

Commit 9406deb

Browse files
BelphemurOxyjun
authored andcommitted
fix(.net): fix example for .NET (cloudflare#20935)
* fix(.net): fix example for .NET When using latest version of AWS.S3 SDK the DisableDefaultChecksumValidation = true also needs to be provided else the SDK still tries to sign the payload. * Retriggering pipeline --------- Co-authored-by: Jun Lee <[email protected]>
1 parent d9c99e9 commit 9406deb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/content/docs/r2/examples/aws/aws-sdk-net.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ static async Task ListObjectsV2()
8383
The [PutObjectAsync](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/S3/MIS3PutObjectAsyncPutObjectRequestCancellationToken.html) and [GetObjectAsync](https://docs.aws.amazon.com/sdkfornet/v3/apidocs/items/S3/MIS3GetObjectAsyncStringStringCancellationToken.html) methods can be used to upload objects and download objects from an R2 bucket respectively.
8484

8585
:::caution
86-
87-
`DisablePayloadSigning = true` must be passed as Cloudflare R2 does not currently support the Streaming SigV4 implementation used by AWSSDK.S3.
88-
86+
`DisablePayloadSigning = true` and `DisableDefaultChecksumValidation = true` must be passed as Cloudflare R2 does not currently support the Streaming SigV4 implementation used by AWSSDK.S3.
8987
:::
9088

9189
```csharp
@@ -95,7 +93,8 @@ static async Task PutObject()
9593
{
9694
FilePath = @"/path/file.txt",
9795
BucketName = "sdk-example",
98-
DisablePayloadSigning = true
96+
DisablePayloadSigning = true,
97+
DisableDefaultChecksumValidation = true
9998
};
10099

101100
var response = await s3Client.PutObjectAsync(request);

0 commit comments

Comments
 (0)