Skip to content

Commit 0b255bc

Browse files
authored
chore: Marking Storage's key-based API as deprecated in the Category implementation. (#3863)
1 parent 59eb807 commit 0b255bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Amplify/Categories/Storage/StorageCategory+ClientBehavior.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Foundation
99

1010
extension StorageCategory: StorageCategoryBehavior {
1111

12+
@available(*, deprecated, message: "Use getURL(path:options:)")
1213
@discardableResult
1314
public func getURL(
1415
key: String,
@@ -25,6 +26,7 @@ extension StorageCategory: StorageCategoryBehavior {
2526
try await plugin.getURL(path: path, options: options)
2627
}
2728

29+
@available(*, deprecated, message: "Use downloadData(path:options:)")
2830
@discardableResult
2931
public func downloadData(
3032
key: String,
@@ -41,6 +43,7 @@ extension StorageCategory: StorageCategoryBehavior {
4143
plugin.downloadData(path: path, options: options)
4244
}
4345

46+
@available(*, deprecated, message: "Use downloadFile(path:options:)")
4447
@discardableResult
4548
public func downloadFile(
4649
key: String,
@@ -59,6 +62,7 @@ extension StorageCategory: StorageCategoryBehavior {
5962
plugin.downloadFile(path: path, local: local, options: options)
6063
}
6164

65+
@available(*, deprecated, message: "Use uploadData(path:options:)")
6266
@discardableResult
6367
public func uploadData(
6468
key: String,
@@ -77,6 +81,7 @@ extension StorageCategory: StorageCategoryBehavior {
7781
plugin.uploadData(path: path, data: data, options: options)
7882
}
7983

84+
@available(*, deprecated, message: "Use uploadFile(path:options:)")
8085
@discardableResult
8186
public func uploadFile(
8287
key: String,
@@ -95,6 +100,7 @@ extension StorageCategory: StorageCategoryBehavior {
95100
plugin.uploadFile(path: path, local: local, options: options)
96101
}
97102

103+
@available(*, deprecated, message: "Use remove(path:options:)")
98104
@discardableResult
99105
public func remove(
100106
key: String,
@@ -111,6 +117,7 @@ extension StorageCategory: StorageCategoryBehavior {
111117
try await plugin.remove(path: path, options: options)
112118
}
113119

120+
@available(*, deprecated, message: "Use list(path:options:)")
114121
@discardableResult
115122
public func list(
116123
options: StorageListOperation.Request.Options? = nil

0 commit comments

Comments
 (0)