Skip to content

Commit 96c7f2e

Browse files
authored
update storage identityId path (#8237)
1 parent f95de0c commit 96c7f2e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/pages/[platform]/build-a-backend/storage/download-files/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ import { getUrl } from 'aws-amplify/storage';
6969

7070
const linkToStorageFile = await getUrl({
7171
path: "album/2024/1.jpg",
72-
// Alternatively, path: ({identityId}) => `album/{identityId}/1.jpg`
72+
// Alternatively, path: ({identityId}) => `album/${identityId}/1.jpg`
7373
});
7474
console.log('signed URL: ', linkToStorageFile.url);
7575
console.log('URL expires at: ', linkToStorageFile.expiresAt);

src/pages/[platform]/build-a-backend/storage/list-files/index.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { list } from 'aws-amplify/storage';
3939

4040
const result = await list({
4141
path: 'album/photos/',
42-
// Alternatively, path: ({identityId}) => `album/{identityId}/photos/`
42+
// Alternatively, path: ({identityId}) => `album/${identityId}/photos/`
4343
});
4444
```
4545

@@ -72,7 +72,7 @@ let nextToken;
7272
const loadNextPage = async () => {
7373
const response = await list({
7474
path: 'photos/',
75-
// Alternatively, path: ({ identityId }) => `album/{identityId}/photos/`
75+
// Alternatively, path: ({ identityId }) => `album/${identityId}/photos/`
7676
options: {
7777
pageSize: PAGE_SIZE,
7878
nextToken,
@@ -93,7 +93,7 @@ import { list } from 'aws-amplify/storage';
9393
9494
const result = await list({
9595
path: 'album/photos/',
96-
// Alternatively, path: ({identityId}) => `album/{identityId}/photos/`,
96+
// Alternatively, path: ({identityId}) => `album/${identityId}/photos/`,
9797
options: {
9898
listAll: true,
9999
}
@@ -1070,7 +1070,7 @@ import { getProperties } from 'aws-amplify/storage';
10701070
try {
10711071
const result = await getProperties({
10721072
path: 'album/2024/1.jpg',
1073-
// Alternatively, path: ({ identityId }) => `album/{identityId}/1.jpg`
1073+
// Alternatively, path: ({ identityId }) => `album/${identityId}/1.jpg`
10741074
options: {
10751075
// Specify a target bucket using name assigned in Amplify Backend
10761076
bucket: 'assignedNameInAmplifyBackend'

src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { remove } from 'aws-amplify/storage';
4141
try {
4242
await remove({
4343
path: 'album/2024/1.jpg',
44-
// Alternatively, path: ({identityId}) => `album/{identityId}/1.jpg`
44+
// Alternatively, path: ({identityId}) => `album/${identityId}/1.jpg`
4545
bucket: 'assignedNameInAmplifyBackend', // Specify a target bucket using name assigned in Amplify Backend
4646
});
4747
} catch (error) {

0 commit comments

Comments
 (0)