From 679d78a3f36fa995a787afb9c802720025e7ef69 Mon Sep 17 00:00:00 2001 From: Hui Zhao Date: Thu, 29 Jun 2023 12:33:25 -0700 Subject: [PATCH] fix(storage): missing Size in listParts output --- packages/storage/__tests__/AwsClients/S3/cases/listParts.ts | 4 ++++ packages/storage/src/AwsClients/S3/listParts.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/packages/storage/__tests__/AwsClients/S3/cases/listParts.ts b/packages/storage/__tests__/AwsClients/S3/cases/listParts.ts index 0ff6327a329..e27b11e7ada 100644 --- a/packages/storage/__tests__/AwsClients/S3/cases/listParts.ts +++ b/packages/storage/__tests__/AwsClients/S3/cases/listParts.ts @@ -36,10 +36,12 @@ const listPartsHappyCase: ApiFunctionalTestCase = [ '' + '1' + 'etag1' + + '5242880' + '' + '' + '2' + 'etag2' + + '1024' + '' + '', }, @@ -50,10 +52,12 @@ const listPartsHappyCase: ApiFunctionalTestCase = [ { PartNumber: 1, ETag: 'etag1', + Size: 5242880, }, { PartNumber: 2, ETag: 'etag2', + Size: 1024, }, ], }, diff --git a/packages/storage/src/AwsClients/S3/listParts.ts b/packages/storage/src/AwsClients/S3/listParts.ts index 0493fcae59c..3cb5a718352 100644 --- a/packages/storage/src/AwsClients/S3/listParts.ts +++ b/packages/storage/src/AwsClients/S3/listParts.ts @@ -84,6 +84,7 @@ const deserializeCompletedPartList = (input: any[]): CompletedPart[] => map(item, { PartNumber: ['PartNumber', deserializeNumber], ETag: 'ETag', + Size: ['Size', deserializeNumber], }) );