diff --git a/src/pages/[platform]/build-a-backend/storage/download-files/index.mdx b/src/pages/[platform]/build-a-backend/storage/download-files/index.mdx index 2b4c5f67ace..98d1db1672a 100644 --- a/src/pages/[platform]/build-a-backend/storage/download-files/index.mdx +++ b/src/pages/[platform]/build-a-backend/storage/download-files/index.mdx @@ -69,7 +69,7 @@ import { getUrl } from 'aws-amplify/storage'; const linkToStorageFile = await getUrl({ path: "album/2024/1.jpg", - // Alternatively, path: ({identityId}) => `album/{identityId}/1.jpg` + // Alternatively, path: ({identityId}) => `album/${identityId}/1.jpg` }); console.log('signed URL: ', linkToStorageFile.url); console.log('URL expires at: ', linkToStorageFile.expiresAt); diff --git a/src/pages/[platform]/build-a-backend/storage/list-files/index.mdx b/src/pages/[platform]/build-a-backend/storage/list-files/index.mdx index f37030bab64..947557bfa50 100644 --- a/src/pages/[platform]/build-a-backend/storage/list-files/index.mdx +++ b/src/pages/[platform]/build-a-backend/storage/list-files/index.mdx @@ -39,7 +39,7 @@ import { list } from 'aws-amplify/storage'; const result = await list({ path: 'album/photos/', - // Alternatively, path: ({identityId}) => `album/{identityId}/photos/` + // Alternatively, path: ({identityId}) => `album/${identityId}/photos/` }); ``` @@ -72,7 +72,7 @@ let nextToken; const loadNextPage = async () => { const response = await list({ path: 'photos/', - // Alternatively, path: ({ identityId }) => `album/{identityId}/photos/` + // Alternatively, path: ({ identityId }) => `album/${identityId}/photos/` options: { pageSize: PAGE_SIZE, nextToken, @@ -93,7 +93,7 @@ import { list } from 'aws-amplify/storage'; const result = await list({ path: 'album/photos/', - // Alternatively, path: ({identityId}) => `album/{identityId}/photos/`, + // Alternatively, path: ({identityId}) => `album/${identityId}/photos/`, options: { listAll: true, } @@ -1070,7 +1070,7 @@ import { getProperties } from 'aws-amplify/storage'; try { const result = await getProperties({ path: 'album/2024/1.jpg', - // Alternatively, path: ({ identityId }) => `album/{identityId}/1.jpg` + // Alternatively, path: ({ identityId }) => `album/${identityId}/1.jpg` options: { // Specify a target bucket using name assigned in Amplify Backend bucket: 'assignedNameInAmplifyBackend' diff --git a/src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx b/src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx index f597b8d13e9..fe726784d84 100644 --- a/src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx +++ b/src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx @@ -41,7 +41,7 @@ import { remove } from 'aws-amplify/storage'; try { await remove({ path: 'album/2024/1.jpg', - // Alternatively, path: ({identityId}) => `album/{identityId}/1.jpg` + // Alternatively, path: ({identityId}) => `album/${identityId}/1.jpg` bucket: 'assignedNameInAmplifyBackend', // Specify a target bucket using name assigned in Amplify Backend }); } catch (error) {