Skip to content

Commit f351776

Browse files
committed
fix(lib-storage): set default ChecksumAlgorithm when calling CreateMPU
1 parent f22d3e8 commit f351776

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/lib-storage/src/Upload.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
AbortMultipartUploadCommand,
3+
ChecksumAlgorithm,
34
CompletedPart,
45
CompleteMultipartUploadCommand,
56
CompleteMultipartUploadCommandOutput,
@@ -200,7 +201,11 @@ export class Upload extends EventEmitter {
200201

201202
private async __createMultipartUpload(): Promise<CreateMultipartUploadCommandOutput> {
202203
if (!this.createMultiPartPromise) {
203-
const createCommandParams = { ...this.params, Body: undefined };
204+
const createCommandParams = {
205+
ChecksumAlgorithm: ChecksumAlgorithm.CRC32,
206+
...this.params,
207+
Body: undefined,
208+
};
204209
this.createMultiPartPromise = this.client
205210
.send(new CreateMultipartUploadCommand(createCommandParams))
206211
.then((createMpuResponse) => {

0 commit comments

Comments
 (0)