Skip to content
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): multi bucket copy #5674

Open
wants to merge 6 commits into
base: multi-bucket
Choose a base branch
from

Conversation

tyllark
Copy link
Member

@tyllark tyllark commented Nov 14, 2024

Issue #, if available:

Description of changes:

  • Corrected toJson() for Storage Option classes
  • Updated copy api to accept an optional buckets parameter
  • Added tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tyllark tyllark requested a review from a team as a code owner November 14, 2024 11:42
@tyllark tyllark changed the title Feat/multi bucket copy feat(storage): multi bucket copy Nov 14, 2024

/// plugin specific options for `Amplify.Storage.copy`.
final StorageCopyPluginOptions? pluginOptions;

/// Optionally specify which bucket to target
final CopyBuckets? buckets;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Does JS also use CopyBuckets buckets for copy API optinal param?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No they have a different copy signature that is more extensible:

  • source
    • path
    • bucket
  • destination
    • path
    • bucket

I prefer their signature over ours, but it would be a breaking change to wrap our source/destination parameters in an object, so I think we stick with the CopyBuckets approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants