-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(storage): add new internal downloadData api #13887
base: storage-browser/integrity
Are you sure you want to change the base?
feat(storage): add new internal downloadData api #13887
Conversation
// TODO: Remove this interface when we move to public advanced APIs. | ||
import { DownloadDataInput as DownloadDataWithPathInputWithAdvancedOptions } from '../../../../internals/types/inputs'; | ||
|
||
export const downloadData = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other src/providers/s3/apis/internal/<api>
take Amplify singleton as their first input param. We haven't added it here because downloadData isn't supported in SSR and hence isn't required atm
@@ -0,0 +1,90 @@ | |||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing code moved as is with the addition of DownloadDataWithPathInputWithAdvancedOptions
type in input.
* @internal | ||
*/ | ||
export const downloadData = (input: DownloadDataInput): DownloadDataOutput => | ||
downloadDataInternal({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just pass down the whole input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a discussion this is better ATM
Description of changes
src/providers/s3/apis/downloadData.ts
tosrc/providers/s3/apis/internal/downloadData.ts
src/internals/apis/downloadData.ts
Description of how you validated changes
Checklist
yarn test
passesChecklist for repo maintainers
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.