Skip to content

Commit

Permalink
fix: upload docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Nov 27, 2024
1 parent 56104bc commit 196c7ed
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,6 @@ 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 Expand Up @@ -1567,7 +1566,11 @@ const result = await uploadData({
// configure how object is presented
contentDisposition: "attachment",
// whether to use accelerate endpoint
useAccelerateEndpoint: true
useAccelerateEndpoint: true,
// the account ID that owns requested bucket
expectedBucketOwner: '123456789012',
// whether to check if an object with the same key already exists before completing the upload
preventOverwrite: true,
},
});
```
Expand All @@ -1579,6 +1582,8 @@ Option | Type | Default | Description |
| contentDisposition | string || Specifies presentational information for the object. <br/><br/> Read more at [Content-Disposition documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) |
| metadata | map\<string\> || A map of metadata to store with the object in S3. <br/><br/> Read more at [S3 metadata documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html#UserMetadata) |
| useAccelerateEndpoint | boolean | false | Whether to use accelerate endpoint. <br/><br/> Read more at [Transfer Acceleration](/[platform]/build-a-backend/storage/upload-files/#transfer-acceleration) |
| expectedBucketOwner | string | - | The account ID that owns requested bucket. |
| preventOverwrite | boolean | false | Whether to check if an object with the same key already exists before completing the upload. If exists, a `Precondition Failed` error will be thrown |

<Callout>

Expand Down

0 comments on commit 196c7ed

Please sign in to comment.