From 405b2cc66dc630dbfd36e8dc4a7c897dae99d87c Mon Sep 17 00:00:00 2001 From: AllanZhengYP Date: Mon, 11 Nov 2024 14:24:34 -0800 Subject: [PATCH] feat(storage): allow checksum algo for internal upload API (#14002) --- packages/storage/__tests__/internals/apis/uploadData.test.ts | 2 ++ packages/storage/src/internals/apis/uploadData.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/packages/storage/__tests__/internals/apis/uploadData.test.ts b/packages/storage/__tests__/internals/apis/uploadData.test.ts index e9345d12cc6..c26096d8464 100644 --- a/packages/storage/__tests__/internals/apis/uploadData.test.ts +++ b/packages/storage/__tests__/internals/apis/uploadData.test.ts @@ -49,6 +49,7 @@ describe('uploadData (internal)', () => { onProgress, metadata, expectedBucketOwner, + checksumAlgorithm: 'crc-32', }, }); @@ -67,6 +68,7 @@ describe('uploadData (internal)', () => { onProgress, metadata, expectedBucketOwner, + checksumAlgorithm: 'crc-32', }, }); expect(result).toEqual(mockedUploadTask); diff --git a/packages/storage/src/internals/apis/uploadData.ts b/packages/storage/src/internals/apis/uploadData.ts index 1ebabdb6165..44456edf510 100644 --- a/packages/storage/src/internals/apis/uploadData.ts +++ b/packages/storage/src/internals/apis/uploadData.ts @@ -24,6 +24,7 @@ export const uploadData = (input: UploadDataInput) => { metadata: options?.metadata, preventOverwrite: options?.preventOverwrite, expectedBucketOwner: options?.expectedBucketOwner, + checksumAlgorithm: options?.checksumAlgorithm, // Advanced options locationCredentialsProvider: options?.locationCredentialsProvider,