Skip to content

Commit

Permalink
chore(storage): addressed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tyllark committed Nov 15, 2024
1 parent 83d9f0c commit 9c6e7ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/amplify_core/lib/src/types/storage/copy_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ class StorageCopyOptions
/// plugin specific options for `Amplify.Storage.copy`.
final StorageCopyPluginOptions? pluginOptions;

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

@override
List<Object?> get props => [pluginOptions];
List<Object?> get props => [pluginOptions, buckets];

@override
String get runtimeTypeName => 'StorageCopyOptions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class StorageS3Service {
});

try {
await _defaultS3Client.copyObject(copyRequest).result;
await s3ClientInfoDestination.client.copyObject(copyRequest).result;
} on smithy.UnknownSmithyHttpException catch (error) {
// S3Client.copyObject may return 403 or 404 error
throw error.toStorageException();
Expand All @@ -442,8 +442,8 @@ class StorageS3Service {
copiedItem: s3PluginOptions.getProperties
? S3Item.fromHeadObjectOutput(
await headObject(
s3client: _defaultS3Client,
bucket: _storageOutputs.bucketName,
s3client: s3ClientInfoDestination.client,
bucket: s3ClientInfoDestination.bucketName,
key: destinationPath,
),
path: destinationPath,
Expand Down

0 comments on commit 9c6e7ed

Please sign in to comment.