Skip to content

Commit

Permalink
docs(js): add durability options
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Nov 27, 2024
1 parent b850c31 commit 56104bc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ Option | Type | Default | Description |
| -- | :--: | :--: | ----------- |
| path | string \| <br/>(\{ identityId \}) => string | Required | A string or callback that represents the path in source and destination bucket to copy the object to or from. <br /> **Each segment of the path in `source` must by URI encoded.** |
| bucket | string \| <br />\{ bucketName: string;<br/> region: string; \} | Default bucket and region from Amplify configuration | A string representing the target bucket's assigned name in Amplify Backend or an object specifying the bucket name and region from the console.<br/><br/>Read more at [Configure additional storage buckets](/[platform]/build-a-backend/storage/set-up-storage/#configure-additional-storage-buckets). |
| eTag | string | Optional | The copy **source object** entity tag (ETag) value. Only Copies the object if its ETag matches the specified tag. |
| notModifiedSince | Date | Optional | Copies the **source object** if it hasn't been modified since the specified time. <br /><br/> **This is evaluated only when `eTag` is NOT supplied**|
| expectedBucketOwner | string | Optional | The account ID that owns source or destination bucket. |

</InlineFilter>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const linkToStorageFile = await getUrl({
expiresIn: 300,
// whether to use accelerate endpoint
useAccelerateEndpoint: true,
// The account ID that owns the requested bucket.
expectedBucketOwner: '123456789012',
}
});
```
Expand All @@ -116,6 +118,7 @@ Option | Type | Default | Description |
| validateObjectExistence | boolean | false | Whether to head object to make sure the object existence before downloading. |
| expiresIn | number | 900 | Number of seconds till the URL expires. <br/><br/> The expiration time of the presigned url is dependent on the session and will max out at 1 hour. |
| useAccelerateEndpoint | boolean | false | Whether to use accelerate endpoint. <br/><br/> Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/extend-s3-resources/#example---enable-transfer-acceleration) |
| expectedBucketOwner | string | Optional | The account ID that owns requested bucket. |

</InlineFilter>

Expand Down Expand Up @@ -1188,6 +1191,7 @@ Option | Type | Default | Description |
| onProgress | callback || Callback function tracking the upload/download progress. |
| bytesRange | \{ start: number; end:number; \} || Bytes range parameter to download a part of the file. |
| useAccelerateEndpoint | boolean | false | Whether to use accelerate endpoint.<br/><br/>Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/extend-s3-resources/#example---enable-transfer-acceleration) |
| expectedBucketOwner | string | Optional | The account ID that owns requested bucket. |

## Frequently Asked Questions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ const result = await list({
| nextToken | string | — | Indicates whether the list is being continued on this bucket with a token |
| subpathStrategy | \{ strategy: 'include' \} \|<br/>\{ 'exclude',<br />delimiter?: string \} | \{ strategy: 'include' \} | An object representing the subpath inclusion strategy and the delimiter used to group results for exclusion. <br/><br/> Read more at [Excluding subpaths](/[platform]/build-a-backend/storage/list-files/#excluding-subpaths) |
| useAccelerateEndpoint | boolean | false | Whether to use accelerate endpoint. <br/><br/> Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/extend-s3-resources/#example---enable-transfer-acceleration) |
| expectedBucketOwner | string | Optional | The account ID that owns requested bucket. |
</InlineFilter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,5 @@ Future<void> remove() async {
Option | Type | Default | Description |
| -- | :--: | :--: | ----------- |
| bucket | string \| <br />\{ bucketName: string;<br/> region: string; \} | Default bucket and region from Amplify configuration | A string representing the target bucket's assigned name in Amplify Backend or an object specifying the bucket name and region from the console.<br/><br/>Read more at [Configure additional storage buckets](/[platform]/build-a-backend/storage/set-up-storage/#configure-additional-storage-buckets) |
| expectedBucketOwner | string | Optional | The account ID that owns requested bucket. |
</InlineFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ Option | Type | Description |
| -- | -- | ----------- |
| getProperties | boolean | Whether to retrieve properties for the uploaded object using theAmplify.Storage.getProperties() after the operation completes. When set to true the returned item will contain additional info such as metadata and content type. |
| useAccelerateEndpoint | boolean | Whether to use accelerate endpoint. <br/><br/> Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/upload-files/#transfer-acceleration) |
| expectedBucketOwner | string | Optional | The account ID that owns requested bucket. |

Example of `uploadFile` with options:

Expand Down

0 comments on commit 56104bc

Please sign in to comment.