-
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 path support to copy API #13104
feat(storage): add path support to copy API #13104
Conversation
3371ea9
to
511e83c
Compare
511e83c
to
4d36d56
Compare
): Promise<CopyOutput> => { | ||
): Promise<CopyOutput> => | ||
isCopyInputWithPath(input) | ||
? copyWithPath(amplify, 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.
why not just directly call isInputWithPath
?
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.
We could do something like isInputWithPath(input.source)
but we need to narrow the input types because copyWithPath expects CopyInputPath and copyWithKey expects CopyInputKey
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.
I am thinking if we can use it and just cast as needed. i am wondering if there is any benefit to this approach over that
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.
Looking great Great work 🎉
Description of changes
Update copy API to support path
Description of how you valdated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.