Skip to content

Commit d0d537c

Browse files
helloimalastairOxyjun
authored andcommitted
R2-3134: Document CRC64NVME Support for Multipart Uploads (cloudflare#23443)
* R2-3134: document CRC64NVME support for multipart uploads * Update src/content/release-notes/r2.yaml * add compat matrix * Update src/content/docs/r2/api/s3/api.mdx --------- Co-authored-by: helloimalastair <[email protected]> Co-authored-by: Jun Lee <[email protected]>
1 parent ae0d596 commit d0d537c

File tree

11 files changed

+15
-107
lines changed

11 files changed

+15
-107
lines changed

src/content/docs/r2/api/s3/api.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@ When using the S3 API, the region for an R2 bucket is `auto`. For compatibility
2828

2929
This also applies to the `LocationConstraint` for the `CreateBucket` API.
3030

31+
## Checksum Types
32+
33+
Checksums have an algorithm and a [type](https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#ChecksumTypes). Refer to the table below.
34+
35+
| Checksum Algorithm | `FULL_OBJECT` | `COMPOSITE` |
36+
| ------------------------- | ------------- | ----------- |
37+
| CRC-64/NVME (`CRC64NVME`) |||
38+
| CRC-32 (`CRC32`) |||
39+
| CRC-32C (`CRC32C`) |||
40+
| SHA-1 (`SHA1`) |||
41+
| SHA-256 (`SHA256`) |||
42+
3143
## Bucket-level operations
3244

3345
The following tables are related to bucket-level operations.

src/content/docs/r2/examples/aws/aws-cli.mdx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ import { Render } from "~/components";
1010

1111
With the [`aws`](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) CLI installed, you may run [`aws configure`](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config) to configure a new profile. You will be prompted with a series of questions for the new profile's details.
1212

13-
:::note[Compatibility]
14-
Client versions `2.23.0` and `1.37.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15-
16-
To mitigate, users can use `2.22.35` or `1.36.40`, or alternatively, add the CRC32 checksum flag to the cli command:
17-
18-
```sh
19-
aws s3api put-object --bucket sdk-example --key sdk.png --body file/path --checksum-algorithm CRC32
20-
```
21-
22-
:::
23-
2413
```shell
2514
aws configure
2615
```

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ import { Render } from "~/components";
1010

1111
This example uses version 2 of the [aws-sdk-go](https://github.com/aws/aws-sdk-go-v2) package. You must pass in the R2 configuration credentials when instantiating your `S3` service client:
1212

13-
:::note[Compatibility]
14-
Client version `1.73.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15-
16-
To mitigate, users can use `1.72.3` or add the following to their config:
17-
18-
```go
19-
config.WithRequestChecksumCalculation(0)
20-
config.WithResponseChecksumValidation(0)
21-
```
22-
23-
:::
24-
2513
```go
2614
package main
2715

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ import { Render } from "~/components";
1010

1111
This example uses version 2 of the [aws-sdk-java](https://github.com/aws/aws-sdk-java-v2/#using-the-sdk) package. You must pass in the R2 configuration credentials when instantiating your `S3` service client:
1212

13-
:::note[Compatibility]
14-
Client version `2.30.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15-
16-
To mitigate, users can use `2.29.52` or add the following to their S3Config:
17-
18-
```java
19-
this.requestChecksumCalculation = "when_required",
20-
this.responseChecksumValidation = "when_required"
21-
```
22-
23-
:::
24-
2513
```java
2614
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
2715
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;

src/content/docs/r2/examples/aws/aws-sdk-js-v3.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ JavaScript or TypeScript users may continue to use the [`@aws-sdk/client-s3`](ht
1414
Currently, you cannot use AWS S3-compatible API while developing locally via `wrangler dev`.
1515
:::
1616

17-
:::note[Compatibility]
18-
Client version `3.729.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
19-
20-
To mitigate, users can use `3.726.1` or add the following to their S3Client config:
21-
22-
```ts
23-
requestChecksumCalculation: "WHEN_REQUIRED",
24-
responseChecksumValidation: "WHEN_REQUIRED",
25-
```
26-
27-
:::
28-
2917
```ts
3018
import {
3119
S3Client,

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ This example uses version 3 of the [aws-sdk-net](https://www.nuget.org/packages/
1414

1515
In this example, you will pass credentials explicitly to the `IAmazonS3` initialization. If you wish, use a shared AWS credentials file or the SDK store in-line with other AWS SDKs. Refer to [Configure AWS credentials](https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/net-dg-config-creds.html) for more details.
1616

17-
:::note[Compatibility]
18-
Client version `3.7.963.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
19-
20-
To mitigate, users can use `3.7.962.0` or add the following to their AmazonS3Config:
21-
22-
```csharp
23-
RequestChecksumCalculation = "WHEN_REQUIRED",
24-
ResponseChecksumValidation = "WHEN_REQUIRED"
25-
```
26-
27-
:::
28-
2917
```csharp
3018
private static IAmazonS3 s3Client;
3119

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ import { Render } from "~/components";
1212

1313
This example uses version 3 of the [aws-sdk-php](https://packagist.org/packages/aws/aws-sdk-php) package. You must pass in the R2 configuration credentials when instantiating your `S3` service client:
1414

15-
:::note[Compatibility]
16-
Client version `3.337.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
17-
18-
To mitigate, users can use `3.336.15` or add the following to their $options:
19-
20-
```php
21-
'request_checksum_calculation' => 'when_required',
22-
'response_checksum_validation' => 'when_required'
23-
```
24-
25-
:::
26-
2715
```php
2816
<?php
2917
require 'vendor/aws/aws-autoloader.php';

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ import { Render } from "~/components";
1010

1111
Many Ruby projects also store these credentials in environment variables instead.
1212

13-
:::note[Compatibility]
14-
Client version `1.178.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15-
16-
To mitigate, users can use `1.177.0` or add the following to their s3 client instantiation:
17-
18-
```ruby
19-
request_checksum_calculation: "when_required",
20-
response_checksum_validation: "when_required"
21-
```
22-
23-
:::
24-
2513
Add the following dependency to your `Gemfile`:
2614

2715
```ruby

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ import { Render } from "~/components";
1010

1111
This example uses the [aws-sdk-s3](https://crates.io/crates/aws-sdk-s3) crate from the [AWS SDK for Rust](https://github.com/awslabs/aws-sdk-rust). You must pass in the R2 configuration credentials when instantiating your `S3` client:
1212

13-
:::note[Compatibility]
14-
Client versions may introduce modifications to the default checksum behavior that could be incompatible with R2 APIs.
15-
16-
If you encounter checksum-related errors, add the following to your config:
17-
18-
```rust
19-
.request_checksum_calculation(RequestChecksumCalculation::WhenRequired)
20-
.response_checksum_validation(ResponseChecksumValidation::WhenRequired)
21-
```
22-
23-
:::
24-
2513
## Basic Usage
2614

2715
```rust

src/content/docs/r2/examples/aws/boto3.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ import { Render } from "~/components";
1010

1111
You must configure [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) to use a preconstructed `endpoint_url` value. This can be done through any `boto3` usage that accepts connection arguments; for example:
1212

13-
:::note[Compatibility]
14-
Client version `1.36.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15-
16-
To mitigate, users can use `1.35.99` or add the following to their s3 resource config:
17-
18-
```python
19-
request_checksum_calculation = 'WHEN_REQUIRED',
20-
response_checksum_validation = 'WHEN_REQUIRED'
21-
```
22-
23-
:::
24-
2513
```python
2614
import boto3
2715

0 commit comments

Comments
 (0)