Skip to content

Commit 3a0073f

Browse files
authored
docs(js): support uploadData checksumAlgorithm option (#8162)
1 parent c8ee4aa commit 3a0073f

File tree

1 file changed

+4
-1
lines changed
  • src/pages/[platform]/build-a-backend/storage/upload-files

1 file changed

+4
-1
lines changed

src/pages/[platform]/build-a-backend/storage/upload-files/index.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1568,9 +1568,11 @@ const result = await uploadData({
15681568
// whether to use accelerate endpoint
15691569
useAccelerateEndpoint: true,
15701570
// the account ID that owns requested bucket
1571-
expectedBucketOwner: '123456789012',
1571+
expectedBucketOwner: "123456789012",
15721572
// whether to check if an object with the same key already exists before completing the upload
15731573
preventOverwrite: true,
1574+
// whether to compute the checksum for the data to be uploaded, so the S3 can verify the data integrity
1575+
checksumAlgorithm: "crc-32", // only 'crc-32' is supported currently
15741576
},
15751577
});
15761578
```
@@ -1584,6 +1586,7 @@ Option | Type | Default | Description |
15841586
| useAccelerateEndpoint | boolean | false | Whether to use accelerate endpoint. <br/><br/> Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/upload-files/#transfer-acceleration) |
15851587
| expectedBucketOwner | string | - | The account ID that owns requested bucket. |
15861588
| preventOverwrite | boolean | false | Whether to check if an object with the same key already exists before completing the upload. If exists, a `Precondition Failed` error will be thrown |
1589+
| checksumAlgorithm | "crc-32" | - | Whether to compute the checksum for the data to be uploaded, so the S3 can verify the data integrity. Only 'crc-32' is supported currently |
15871590

15881591
<Callout>
15891592

0 commit comments

Comments
 (0)