Skip to content

Commit 18633b9

Browse files
authored
chore: remove inaccuarte information about downloadData (#8273)
* chore: remove inaccuarte information about downloadData * chore: resolve commments * chore: add gen2 access type link for group access * chore: fix heading order caused accessibility check failures
1 parent 066f608 commit 18633b9

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed

src/fragments/lib/storage/android/download.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{/* TODO Rewrite monitor progress of download for iOS/Flutter/Android? */}
44

5-
#### With StoragePath
5+
### With StoragePath
66

77
<BlockSwitcher>
88
<Block name="Java">
@@ -130,7 +130,7 @@ download
130130

131131
To track progress of the download, use the `downloadFile` API that includes a progress listener callback.
132132

133-
#### With StoragePath
133+
### With StoragePath
134134

135135
<BlockSwitcher>
136136
<Block name="Java">
@@ -268,7 +268,7 @@ download
268268

269269
You can also retrieve a URL for the object in storage:
270270

271-
#### With StoragePath
271+
### With StoragePath
272272

273273
<BlockSwitcher>
274274
<Block name="Java">

src/fragments/lib/storage/ios/download.mdx

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ There are three ways of getting data that was previously uploaded:
44

55
You can download to in-memory buffer [Data](https://developer.apple.com/documentation/foundation/data) object with `Amplify.Storage.downloadData`:
66

7-
#### With StoragePath
7+
### With StoragePath
88
<BlockSwitcher>
99

1010
<Block name="Async/Await">
@@ -48,7 +48,7 @@ let resultSink = downloadTask
4848

4949
</BlockSwitcher>
5050

51-
#### With Key (Deprecated)
51+
### With Key (Deprecated)
5252
<BlockSwitcher>
5353

5454
<Block name="Async/Await">
@@ -96,7 +96,7 @@ let resultSink = downloadTask
9696

9797
You can download to a file [URL](https://developer.apple.com/documentation/foundation/url) with `Amplify.Storage.downloadFile`:
9898

99-
#### With StoragePath
99+
### With StoragePath
100100
<BlockSwitcher>
101101

102102
<Block name="Async/Await">
@@ -158,7 +158,7 @@ let resultSink = downloadTask
158158

159159
</BlockSwitcher>
160160

161-
#### With Key (Deprecated)
161+
### With Key (Deprecated)
162162
<BlockSwitcher>
163163

164164
<Block name="Async/Await">
@@ -296,4 +296,4 @@ downloadTask.resume()
296296

297297
Download tasks are run using `URLSessionTask` instances internally. You can learn more about them in [Apple's official documentation](https://developer.apple.com/documentation/foundation/urlsessiontask).
298298

299-
</Callout>
299+
</Callout>

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -1239,10 +1239,8 @@ Option | Type | Default | Description |
12391239

12401240
## Frequently Asked Questions
12411241

1242-
- `downloadData` is cached; if you have recently modified a file you may not get the latest version right away. You can pass in `cacheControl: 'no-cache'` to get the latest version.
1243-
- `downloadData` only returns the latest cached version of the file; there is [not yet an API to view prior versions](https://github.com/aws-amplify/amplify-js/issues/2131).
12441242
- [Image compression](https://github.com/aws-amplify/amplify-js/issues/6081) or CloudFront CDN caching for your S3 buckets is not yet possible.
1245-
- There is no API for [Cognito Group-based access to files](https://github.com/aws-amplify/amplify-js/issues/3388).
1246-
- There is currently [no API for getting the `identityId` of other users](https://github.com/aws-amplify/amplify-js/issues/5177); you have to retrieve this from elsewhere before calling `Storage.get`.
1243+
- `downloadData` does not provide a cache control option and it replies on runtime HTTP caching behavior. If you need to bypass the cache, you can use the `getUrl` API to create a presigned URL for downloading the file.
1244+
- `downloadData` does not support S3 object versioning, it always downloads the latest version.
12471245

12481246
</InlineFilter>

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,10 @@ Learn more about how to setup an appropriate [CORS Policy](/gen1/[platform]/prev
366366

367367
Users can run into unexpected issues, so we are giving you advance notice in documentation with links to open issues - please vote for what you need, to help the team prioritize.
368368

369-
- `downloadData` is cached; if you have recently modified a file you may not get the latest version right away. You can pass in `cacheControl: 'no-cache'` to get the latest version.
370-
- `downloadData` only returns the latest cached version of the file; there is [not yet an API to view prior versions](https://github.com/aws-amplify/amplify-js/issues/2131).
371369
- [Image compression](https://github.com/aws-amplify/amplify-js/issues/6081) or CloudFront CDN caching for your S3 buckets is not yet possible.
372-
- There is no API for [Cognito Group-based access to files](https://github.com/aws-amplify/amplify-js/issues/3388).
373-
- There is currently [no API for getting the identityId of other users](https://github.com/aws-amplify/amplify-js/issues/5177); you have to retrieve this from elsewhere before calling `Storage.get`.
370+
- There is currently [no API for getting the identityId of other users](https://github.com/aws-amplify/amplify-js/issues/5177); you have to retrieve this from elsewhere before calling `downloadData`.
371+
- `downloadData` does not provide a cache control option and it replies on runtime HTTP caching behavior. If you need to bypass the cache, you can use the `getUrl` API to create a presigned URL for downloading the file.
372+
- `downloadData` does not support S3 object versioning, it always downloads the latest version.
373+
- There is no API for [Cognito Group-based access to files](https://github.com/aws-amplify/amplify-js/issues/3388). You may use [Amplify Gen2 Storage](/[platform]/build-a-backend/storage/authorization/#access-types) to achieve this.
374374

375375
</InlineFilter>

0 commit comments

Comments
 (0)