Skip to content

chore: remove inaccuarte information about downloadData #8273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 3, 2025
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
6 changes: 3 additions & 3 deletions src/fragments/lib/storage/android/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

#### With StoragePath
### With StoragePath

<BlockSwitcher>
<Block name="Java">
Expand Down Expand Up @@ -130,7 +130,7 @@ download

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

#### With StoragePath
### With StoragePath

<BlockSwitcher>
<Block name="Java">
Expand Down Expand Up @@ -268,7 +268,7 @@ download

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

#### With StoragePath
### With StoragePath

<BlockSwitcher>
<Block name="Java">
Expand Down
10 changes: 5 additions & 5 deletions src/fragments/lib/storage/ios/download.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ There are three ways of getting data that was previously uploaded:

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

#### With StoragePath
### With StoragePath
<BlockSwitcher>

<Block name="Async/Await">
Expand Down Expand Up @@ -48,7 +48,7 @@ let resultSink = downloadTask

</BlockSwitcher>

#### With Key (Deprecated)
### With Key (Deprecated)
<BlockSwitcher>

<Block name="Async/Await">
Expand Down Expand Up @@ -96,7 +96,7 @@ let resultSink = downloadTask

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

#### With StoragePath
### With StoragePath
<BlockSwitcher>

<Block name="Async/Await">
Expand Down Expand Up @@ -158,7 +158,7 @@ let resultSink = downloadTask

</BlockSwitcher>

#### With Key (Deprecated)
### With Key (Deprecated)
<BlockSwitcher>

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

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).

</Callout>
</Callout>
Original file line number Diff line number Diff line change
Expand Up @@ -1239,10 +1239,8 @@ Option | Type | Default | Description |

## Frequently Asked Questions

- `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.
- `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).
- [Image compression](https://github.com/aws-amplify/amplify-js/issues/6081) or CloudFront CDN caching for your S3 buckets is not yet possible.
- There is no API for [Cognito Group-based access to files](https://github.com/aws-amplify/amplify-js/issues/3388).
- 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`.
- `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.
- `downloadData` does not support S3 object versioning, it always downloads the latest version.

</InlineFilter>
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,10 @@ Learn more about how to setup an appropriate [CORS Policy](/gen1/[platform]/prev

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.

- `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.
- `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).
- [Image compression](https://github.com/aws-amplify/amplify-js/issues/6081) or CloudFront CDN caching for your S3 buckets is not yet possible.
- There is no API for [Cognito Group-based access to files](https://github.com/aws-amplify/amplify-js/issues/3388).
- 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`.
- 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`.
- `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.
- `downloadData` does not support S3 object versioning, it always downloads the latest version.
- 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.

</InlineFilter>