diff --git a/packages/storage/__tests__/providers/s3/apis/list.test.ts b/packages/storage/__tests__/providers/s3/apis/list.test.ts index 6defa0e89aa..b57d282f096 100644 --- a/packages/storage/__tests__/providers/s3/apis/list.test.ts +++ b/packages/storage/__tests__/providers/s3/apis/list.test.ts @@ -125,7 +125,7 @@ describe('list API', () => { expect.assertions(4); const customPageSize = 5; const response = await list({ - path: 'listWithTokenResultsPath', + prefix: 'listWithTokenResultsPath', options: { accessLevel: 'guest', pageSize: customPageSize, @@ -148,7 +148,7 @@ describe('list API', () => { mockListObjectsV2ApiWithPages(3); const result = await list({ - path: 'listALLResultsPath', + prefix: 'listALLResultsPath', options: { accessLevel: 'guest', listAll: true }, }); @@ -185,7 +185,7 @@ describe('list API', () => { expect.assertions(3); let response = await list({ - path: 'emptyListResultsPath', + prefix: 'emptyListResultsPath', options: { accessLevel: 'guest', }, diff --git a/packages/storage/src/providers/s3/apis/internal/list.ts b/packages/storage/src/providers/s3/apis/internal/list.ts index 3f7fc37776c..fff8647d7ad 100644 --- a/packages/storage/src/providers/s3/apis/internal/list.ts +++ b/packages/storage/src/providers/s3/apis/internal/list.ts @@ -34,7 +34,7 @@ export const list = async ( | StorageListRequest | StorageListRequest ): Promise => { - const { options = {}, path = '' } = listRequest ?? {}; + const { options = {}, prefix: path = '' } = listRequest ?? {}; const { s3Config, bucket, diff --git a/packages/storage/src/types/requests.ts b/packages/storage/src/types/requests.ts index 27eff108b58..2b8f59db3b1 100644 --- a/packages/storage/src/types/requests.ts +++ b/packages/storage/src/types/requests.ts @@ -18,7 +18,7 @@ export type StorageOperationRequest = { export type StorageListRequest< Options extends StorageListAllOptions | StorageListPaginateOptions > = { - path?: string; + prefix?: string; options?: Options; };