Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/`
});
```

Expand Down Expand Up @@ -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,
Expand All @@ -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,
}
Expand Down Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down