Skip to content

Commit d961106

Browse files
khatruong2009Jordan-NelsonEquarteyNikaHsn
authored
feat!: Update storage APIs to accept StoragePath (#4713)
* feat!: Update storage APIs to accept `StoragePath` (#4549) * chore: add `StoragePath` * chore: add `S3PathResolver` * chore: update `getUrl` and `getProperties` API * chore: update S3UploadTask * chore: fix tests * chore: validate storage path * chore: add tests for S3PathResolver * feat: Gen 2 Upload APIs (#4542) * feat: add path parameter and made key optional Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: added/modified unit tests and added a missing deprecation tag Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: added extra assert statement to make sure users don't put in both path and key into upload method Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: add ignore statements to ignore key deprecated warnings * chore: add ignore statements for deprecated members --------- Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: refactor StoragePath (#4544) * chore: remove `key` from public APIs * chore: update tests to adjust for using path * chore: fix lint issues * chore: fix formatting * chore: fix test * chore: remove lint ignored * chore: update comment * chore: remove unused method * chore: skip tests other than main * chore: update generated code * chore: add leading `/` * feat(storage): copy and move APIs (#4569) * chore: update copy api * chore: update integ tests for copy * chore: removed unused code * chore: add back test * chore: update download apis to use path (#4561) * chore: add `StoragePath` * chore: add `S3PathResolver` * chore: update `getUrl` and `getProperties` API * chore: update S3UploadTask * chore: fix tests * chore: validate storage path * chore: add tests for S3PathResolver * feat: Gen 2 Upload APIs (#4542) * feat: add path parameter and made key optional Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: added/modified unit tests and added a missing deprecation tag Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: added extra assert statement to make sure users don't put in both path and key into upload method Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: add ignore statements to ignore key deprecated warnings * chore: add ignore statements for deprecated members --------- Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: refactor StoragePath (#4544) * chore: remove `key` from public APIs * chore: update tests to adjust for using path * chore: fix lint issues * chore: fix formatting * chore: fix test * chore: remove lint ignored * chore: update comment * chore: remove unused method * chore: update download apis to use path * chore: skip tests other than main * chore: run dart format on both files that are receiving analyze warnings * chore: used dart fix to add trailing commas * chore: fixed formatting * chore: run format on test files * chore: fix formatting in integration tests * chore: update generated code * chore: add leading `/` * chore: remove access level from e2e test * fix(auth): device metadata migration (#4503) * merge main * chore: added a bracket and removed new keywords * chore: changed signature of deleteLegacyDeviceSecrets and regenerated pigeons. Changed legacysecrethandler.kt file to .txt to "comment" it out * chore: run dart format on generated file * chore: migrateLegacyDeviceSecrets now gets called before deleteLegacyCredentials. Cognito_device_secrets return type fixed * chore: add delete and fetch methods to the cognito swift file * fix: various issues with implementation * chore: fix lint issues * test: update test to include mfa and token refresh * chore: use coroutines, add plugin * chore: remove generate code in iOS * chore: fetch asf deviceId from shared prefs directly * chore: update error name * chore: remove native auth plugin * chore: remove old legacy handler * chore: remove check for null device metadata * chore: flatten nested if statements * chore: remove unused type --------- Co-authored-by: Kha Truong <64438356+khatruong2009@users.noreply.github.com> * fix(auth): Allow retries with verifyTotpSetup() (#4532) * chore(version): cherry pick Bump version (#4545) * fix(auth): verifyTotp throw EnableSoftwareTokenMfaException (#4558) * chore(version): cherry pick Bump version (#4560) * chore: Update BUG-REPORT.yaml (#4568) * fix: correct `package_info_plus` version constraint (#4583) chore: fix version constraint * feat(storage): copy and move APIs (#4569) * chore: update copy api * chore: update integ tests for copy * chore: removed unused code * chore: add back test * chore: update download apis to use path * chore: remove duplicate code from rebase * chore: removed random text file * chore: remove commented code * chore: fix failing tests * chore: update options, tests * chore: update options classes * chore: add back temp dir * chore: fix integ test * chore: add skip back to io specific test * chore: skip test set up in configs other than main --------- Co-authored-by: Jordan Nelson <Jordanryannelson@gmail.com> Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Elijah Quartey <Equartey@users.noreply.github.com> * feat(storage): update `remove` and `removeMany` APIs (#4593) * chore: update removeMany API * chore: update remove api, tests * chore: handle leading slash * test: update e2e tests * chore: update sample app * chore: fix comment * chore: add doc comment * chore: update path validation logic * chore: remove leading `/` from tests * chore: add `/` back to `StoragePathValidationException` test * chore: update tests * chore: remove leading `/` * chore: update tests * chore: remove unused types and constructors, use consistent naming (#4603) * chore: remove unused types and properties * fix: set path of S3Item in download file * chore: use consistent naming when resolving path * chore: update path resolution in tests * fix: update where leading `/` is added for getUrl * feat: update list API (#4600) * feat: list API init commit * chore: removed / from beginning of paths * chore: fix formatting * chore: fix formatting and tests * chore: fix formatting in storage_s3_service_test.dart * chore: remove commented code and and / before paths * Apply suggestions from code review Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore: remove accessLevel from StorageListOptions * chore: removed prefix formatter and fixed formatting * chore: removed unused field * chore: remove prefix resolver and fix classes * chore: change variable name Co-Authored-By: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore: fix formatting * chore: add deleted documentation back in * chore: fixed comment placement --------- Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> * chore(storage): cleanup and enable tests (#4617) * chore: update canary tests * chore: remove `StorageOperationOptions` * chore: remove access level from examples * chore: update doc comment * chore: enable transfer acceleration tests * chore: update not found message * chore: update `S3PathResolver` doc comments * fix: copy impl * chore: remove skips from tests * chore: add back other env to integ tests * chore: remove targetIdentityId from `S3ListOptions` * chore: remove try/catch from test * chore: update formatting * chore: update copy test * Update packages/storage/amplify_storage_s3/example/integration_test/use_case_test.dart * chore: add space back to test path * chore: update path in test * chore: clean up example app * chore: rename `withIdentityId` to `fromIdentityId` * chore: add validation for empty path * chore: add tests for path resolver * chore: remove reference to CLI in doc comment * chore: add comment to `StoragePathFromIdentityId` * chore: revert public API changes in s3 list result * chore: use `resolvePaths` in copy API * chore: update error handling for identityId * chore: undo changes to type cast in html download file * chore: fix failing copy tests * chore: update doc comment Co-authored-by: NikaHsn <nika.hasani@gmail.com> * chore: update doc comments Co-authored-by: NikaHsn <nika.hasani@gmail.com> --------- Co-authored-by: Jordan Nelson <Jordanryannelson@gmail.com> Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Elijah Quartey <Equartey@users.noreply.github.com> Co-authored-by: NikaHsn <nika.hasani@gmail.com> * chore!: remove prefix resolver, passthrough prefix resolver, and accessLevel (#4631) - Remove prefix resolver, passthrough prefix resolver, and accessLevel --------- Co-authored-by: Jordan Nelson <Jordanryannelson@gmail.com> Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Elijah Quartey <Equartey@users.noreply.github.com> * chore(storage): add e2e tests for `uploadData`, `uploadFile`, `getUrl`, `getProperties` (#4615) * chore: add tests for upload * chore: update constructor name * chore: update teardown * chore: add tests for unauthorized path * chore: add getUrl tests * chore: make vars final * chore: create util for user tear down * chore: add get properties test * chore: update doc comments * chore: fix failing test * chore: update tests to use `testWidgets` * chore: fix failing web e2e tests * chore: rethrow teardown failures * chore: use `expectedResolvedPath` in upload op * chore: use util for generating user/pw * chore: use `AWSFile.fromPath` in tests * chore: update file names * chore: update removeMany API, add tests for `remove`, `removeMany`, `copy` (#4748) * chore: update remove many API * chore: use `expectLater` in tests, add test for non existent path * chore: add e2e tests for `remove`, `removeMany` * chore: refactor `objectExists` util * chore: add copy tests * chore update main_test file * chore: E2E tests for downloadFile, downloadData, and List (#4697) * chore: add downloadData and downloadFile e2e tests * chore: fix formatting * chore: fix formatting part 2 * chore: change amplifyEnvironments key to main * chore: uncomment addTearDown * chore: comment addTearDown again * chore: use addTearDown instead of tearDownAll * chore: uncomment addTearDown in configure.dart file * chore: add e2e tests for list() * chore: fixed formatting issues caused by merge * chore: fix tests to return a future in the teardown * chore: fix formatting * chore: upgrade e2e tests to java 17 * chore: revert previous commit * chore: remove storage_path_with_identity_id.dart file from merge * chore: replace if statement with expect * chore: delete create_file and switch uploadFile to uploadData in tests * Update packages/storage/amplify_storage_s3/example/integration_test/list_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore: fix formatting and add signInNewUser * chore: move uploadData to setupAll and add path verification * chore: fix formatting * chore: move uploadData methods to setupAll at the beginning of the test * chore: add expects for value on the result in download files * chore: fixed formatting * chore: add expects for file path and fixed variables * chore: add test for listAll option * chore: fix formatting * chore: switch tests to testWidgets * chore: add test for unauthorized path * chore: add tests for different localFile constructors * chore: fix formatting * chore: use addTearDownPath and added paths * chore: fix formatting * chore: change metadata headers to description * Update packages/storage/amplify_storage_s3/example/integration_test/download_data_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore: make all vars final if possible * chore: fixed formatting and renamed variables * chore: fix test grouping * Update packages/storage/amplify_storage_s3/example/integration_test/download_file_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * Update packages/storage/amplify_storage_s3/example/integration_test/download_file_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore: remove unnecessary tearDown * chore: add file ops and adjusted other tests * chore: change list test exception * Update packages/storage/amplify_storage_s3/example/integration_test/download_file_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * Update packages/storage/amplify_storage_s3/example/integration_test/download_file_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * Update packages/storage/amplify_storage_s3/example/integration_test/download_data_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * Update packages/storage/amplify_storage_s3/example/integration_test/download_file_test.dart Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore: fix formatting * Revert "chore: fix formatting" This reverts commit a0d9080. * Revert "Merge branch 'feat/storage-gen2' into feat/storage/e2e/download-list" This reverts commit d0a92cd, reversing changes made to d9746a8. * chore: fix merge errors * chore: fix more merge changes --------- Co-authored-by: Jordan Nelson <nejrd@amazon.com> * chore(storage): remove deprecated storage options (#4749) * chore(storage): add test coverage, remove old e2e tests (#4763) * chore: add test for content type inference * chore: add test for url with special characters * chore: remove old integ tests * fix: include useAccelerateEndpoint in upload * fix: only close sink if it exists * chore: add tests for an env with dots in the name --------- Co-authored-by: Jordan Nelson <Jordanryannelson@gmail.com> Co-authored-by: Jordan Nelson <20613561+Jordan-Nelson@users.noreply.github.com> Co-authored-by: Jordan Nelson <nejrd@amazon.com> Co-authored-by: Elijah Quartey <Equartey@users.noreply.github.com> Co-authored-by: NikaHsn <nika.hasani@gmail.com>
1 parent ab2241d commit d961106

File tree

123 files changed

+3063
-4604
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3063
-4604
lines changed

canaries/integration_test/main_test.dart

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ void main() {
3030
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
3131

3232
const data = 'hello, world';
33-
const dataKey = 'hello';
33+
const path = StoragePath.fromString('public/hello');
3434
final event = AnalyticsEvent('hello');
3535

3636
Future<void> performUnauthenticatedActions() async {
3737
// Upload data to Storage
3838
await Amplify.Storage.uploadData(
3939
data: HttpPayload.string(data),
40-
key: dataKey,
40+
path: path,
4141
).result;
4242

4343
// Record Analytics event
@@ -63,19 +63,15 @@ void main() {
6363
Future<void> performAuthenticatedActions() async {
6464
// Retrieve guest data
6565
final guestData = await Amplify.Storage.downloadData(
66-
key: dataKey,
67-
options: const StorageDownloadDataOptions(
68-
accessLevel: StorageAccessLevel.guest,
69-
),
66+
path: path,
7067
).result;
7168
expect(utf8.decode(guestData.bytes), data);
7269

7370
// Upload data to Storage
7471
await Amplify.Storage.uploadData(
7572
data: HttpPayload.string(data),
76-
key: dataKey,
77-
options: const StorageUploadDataOptions(
78-
accessLevel: StorageAccessLevel.private,
73+
path: StoragePath.fromIdentityId(
74+
(String identityId) => 'private/$identityId/hello',
7975
),
8076
).result;
8177

packages/amplify_core/lib/src/category/amplify_storage_category.dart

Lines changed: 28 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ part of 'amplify_categories.dart';
99
///
1010
/// It comes with default, built-in support for Amazon S3 service
1111
/// leveraging Amplify Auth Category for authorization.
12-
///
13-
/// The Amplify CLI helps you to create and configure the storage category
14-
/// and auth category.
1512
/// {@endtemplate}
1613
class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
1714
@override
@@ -37,7 +34,7 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
3734
/// returns a [StorageListOperation].
3835
/// {@endtemplate}
3936
StorageListOperation list({
40-
String? path,
37+
required StoragePath path,
4138
StorageListOptions? options,
4239
}) {
4340
return identifyCall(
@@ -50,84 +47,84 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
5047
}
5148

5249
/// {@template amplify_core.amplify_storage_category.get_properties}
53-
/// Retrieves properties of the object specified by [key] with optional
50+
/// Retrieves properties of the object specified by [path] with optional
5451
/// [StorageGetPropertiesOptions]. And returns a
5552
/// [StorageGetPropertiesOperation].
5653
///
5754
/// The result may include the metadata (if any) specified when the object
5855
/// was uploaded.
5956
/// {@endtemplate}
6057
StorageGetPropertiesOperation getProperties({
61-
required String key,
58+
required StoragePath path,
6259
StorageGetPropertiesOptions? options,
6360
}) {
6461
return identifyCall(
6562
StorageCategoryMethod.getProperties,
6663
() => defaultPlugin.getProperties(
67-
key: key,
64+
path: path,
6865
options: options,
6966
),
7067
);
7168
}
7269

7370
/// {@template amplify_core.amplify_storage_category.get_url}
74-
/// Generates a downloadable url for the object specified by [key] with
71+
/// Generates a downloadable url for the object specified by [path] with
7572
/// [StorageGetUrlOptions], and returns a [StorageGetUrlOperation].
7673
///
7774
/// The url is presigned by the aws_signature_v4, and is enforced with scheme
7875
/// `https`.
7976
/// {@endtemplate}
8077
StorageGetUrlOperation getUrl({
81-
required String key,
78+
required StoragePath path,
8279
StorageGetUrlOptions? options,
8380
}) {
8481
return identifyCall(
8582
StorageCategoryMethod.getUrl,
8683
() => defaultPlugin.getUrl(
87-
key: key,
84+
path: path,
8885
options: options,
8986
),
9087
);
9188
}
9289

9390
/// {@template amplify_core.amplify_storage_category.download_data}
94-
/// Downloads bytes of object specified by [key] into memory with optional
91+
/// Downloads bytes of object specified by [path] into memory with optional
9592
/// [onProgress] and [StorageDownloadDataOptions], and returns a
9693
/// [StorageDownloadDataOperation].
9794
///
9895
/// Ensure you are managing the data in memory properly to avoid unexpected
9996
/// memory leaks.
10097
/// {@endtemplate}
10198
StorageDownloadDataOperation downloadData({
102-
required String key,
99+
required StoragePath path,
103100
void Function(StorageTransferProgress)? onProgress,
104101
StorageDownloadDataOptions? options,
105102
}) {
106103
return identifyCall(
107104
StorageCategoryMethod.downloadData,
108105
() => defaultPlugin.downloadData(
109-
key: key,
106+
path: path,
110107
onProgress: onProgress,
111108
options: options,
112109
),
113110
);
114111
}
115112

116113
/// {@template amplify_core.amplify_storage_category.download_file}
117-
/// Downloads the object specified by [key] to [localFile] with optional
114+
/// Downloads the object specified by [path] to [localFile] with optional
118115
/// [onProgress] and [StorageDownloadFileOptions], and returns a
119116
/// [StorageDownloadFileOperation].
120117
/// {@endtemplate}
121118
StorageDownloadFileOperation downloadFile({
122-
required String key,
119+
required StoragePath path,
123120
required AWSFile localFile,
124121
void Function(StorageTransferProgress)? onProgress,
125122
StorageDownloadFileOptions? options,
126123
}) {
127124
return identifyCall(
128125
StorageCategoryMethod.downloadFile,
129126
() => defaultPlugin.downloadFile(
130-
key: key,
127+
path: path,
131128
localFile: localFile,
132129
onProgress: onProgress,
133130
options: options,
@@ -137,21 +134,21 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
137134

138135
/// {@template amplify_core.amplify_storage_category.upload_data}
139136
/// Uploads [data] as a [StorageDataPayload] with optional
140-
/// [onProgress] and [StorageUploadDataOptions] to object specified by [key],
137+
/// [onProgress] and [StorageUploadDataOptions] to object specified by [path],
141138
/// and returns a [StorageUploadDataOperation].
142139
///
143140
/// See [StorageDataPayload] for supported data formats.
144141
/// {@endtemplate}
145142
StorageUploadDataOperation uploadData({
146143
required StorageDataPayload data,
147-
required String key,
144+
required StoragePath path,
148145
void Function(StorageTransferProgress)? onProgress,
149146
StorageUploadDataOptions? options,
150147
}) {
151148
return identifyCall(
152149
StorageCategoryMethod.uploadData,
153150
() => defaultPlugin.uploadData(
154-
key: key,
151+
path: path,
155152
data: data,
156153
onProgress: onProgress,
157154
options: options,
@@ -161,22 +158,22 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
161158

162159
/// {@template amplify_core.amplify_storage_category.upload_file}
163160
/// Uploads data from [localFile] with optional [onProgress] and
164-
/// [StorageUploadFileOptions] to object specified by [key], and returns a
161+
/// [StorageUploadFileOptions] to object specified by [path], and returns a
165162
/// [StorageUploadFileOperation].
166163
///
167164
/// [AWSFile] provides various adapters to read file content from file
168165
/// abstractions, such as `XFile`, `PlatformFile`, `io.File` or `html.File`.
169166
/// {@endtemplate}
170167
StorageUploadFileOperation uploadFile({
171168
required AWSFile localFile,
172-
required String key,
169+
required StoragePath path,
173170
void Function(StorageTransferProgress)? onProgress,
174171
StorageUploadFileOptions? options,
175172
}) {
176173
return identifyCall(
177174
StorageCategoryMethod.uploadFile,
178175
() => defaultPlugin.uploadFile(
179-
key: key,
176+
path: path,
180177
localFile: localFile,
181178
onProgress: onProgress,
182179
options: options,
@@ -190,12 +187,11 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
190187
/// {@endtemplate}
191188
///
192189
/// {@template amplify_core.amplify_storage_category.copy_source}
193-
/// The `source` should be readable to the API call originator following
194-
/// corresponding [StorageAccessLevel].
190+
/// The `source` should be readable to the API call originator.
195191
/// {@endtemplate}
196192
StorageCopyOperation copy({
197-
required StorageItemWithAccessLevel<StorageItem> source,
198-
required StorageItemWithAccessLevel<StorageItem> destination,
193+
required StoragePath source,
194+
required StoragePath destination,
199195
StorageCopyOptions? options,
200196
}) {
201197
return identifyCall(
@@ -208,65 +204,32 @@ class StorageCategory extends AmplifyCategory<StoragePluginInterface> {
208204
);
209205
}
210206

211-
/// {@template amplify_core.amplify_storage_category.move}
212-
/// Moves [source] to [destination] with optional [StorageMoveOptions],
213-
/// and returns a [StorageMoveOperation].
214-
///
215-
/// This API performs two consecutive S3 service calls:
216-
/// 1. copy the source object to destination objection
217-
/// 2. delete the source object
218-
///
219-
/// {@macro amplify_core.amplify_storage_category.copy_source}
220-
/// {@endtemplate}
221-
@Deprecated(
222-
'This API will be removed in the next major version. '
223-
'This API calls Amplify.Storage.copy() to create a copy of the file in the '
224-
'destination directory and then calls Amplify.Storage.remove() to remove '
225-
'the source file. '
226-
'Please use Amplify.Storage.copy() and Amplify.Storage.remove() directly '
227-
'instead.',
228-
)
229-
StorageMoveOperation move({
230-
required StorageItemWithAccessLevel<StorageItem> source,
231-
required StorageItemWithAccessLevel<StorageItem> destination,
232-
StorageMoveOptions? options,
233-
}) {
234-
return identifyCall(
235-
StorageCategoryMethod.move,
236-
() => defaultPlugin.move(
237-
source: source,
238-
destination: destination,
239-
options: options,
240-
),
241-
);
242-
}
243-
244207
/// {@template amplify_core.amplify_storage_category.remove}
245-
/// Removes an object specified by [key] with optional [StorageRemoveOptions],
208+
/// Removes an object specified by [path] with optional [StorageRemoveOptions],
246209
/// and returns a [StorageRemoveOperation].
247210
/// {@endtemplate}
248211
StorageRemoveOperation remove({
249-
required String key,
212+
required StoragePath path,
250213
StorageRemoveOptions? options,
251214
}) {
252215
return identifyCall(
253216
StorageCategoryMethod.remove,
254-
() => defaultPlugin.remove(key: key, options: options),
217+
() => defaultPlugin.remove(path: path, options: options),
255218
);
256219
}
257220

258221
/// {@template amplify_core.amplify_storage_category.remove_many}
259-
/// Removes multiple objects specified by [keys] with optional
222+
/// Removes multiple objects specified by [paths] with optional
260223
/// [StorageRemoveManyOptions], and returns a [StorageRemoveManyOperation].
261224
/// {@endtemplate}
262225
StorageRemoveManyOperation removeMany({
263-
required List<String> keys,
226+
required List<StoragePath> paths,
264227
StorageRemoveManyOptions? options,
265228
}) {
266229
return identifyCall(
267230
StorageCategoryMethod.removeMany,
268231
() => defaultPlugin.removeMany(
269-
keys: keys,
232+
paths: paths,
270233
options: options,
271234
),
272235
);

packages/amplify_core/lib/src/config/storage/s3_config.dart

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class S3PluginConfig
3434
const S3PluginConfig({
3535
required this.bucket,
3636
required this.region,
37-
this.defaultAccessLevel = StorageAccessLevel.guest,
3837
});
3938

4039
factory S3PluginConfig.fromJson(Map<String, Object?> json) =>
@@ -48,24 +47,20 @@ class S3PluginConfig
4847

4948
final String bucket;
5049
final String region;
51-
final StorageAccessLevel defaultAccessLevel;
5250

5351
@override
5452
List<Object?> get props => [
5553
bucket,
5654
region,
57-
defaultAccessLevel,
5855
];
5956

6057
S3PluginConfig copyWith({
6158
String? bucket,
6259
String? region,
63-
StorageAccessLevel? defaultAccessLevel,
6460
}) {
6561
return S3PluginConfig(
6662
bucket: bucket ?? this.bucket,
6763
region: region ?? this.region,
68-
defaultAccessLevel: defaultAccessLevel ?? this.defaultAccessLevel,
6964
);
7065
}
7166

packages/amplify_core/lib/src/config/storage/s3_config.g.dart

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)