You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param id The unique identifier of the bucket you would like to empty.
64
67
*/
65
68
asyncemptyBucket(
66
69
id: string
@@ -74,8 +77,10 @@ export class StorageApi {
74
77
}
75
78
76
79
/**
77
-
* Delete a bucket
78
-
* @param id the bucket id to be deleted
80
+
* Deletes an existing bucket. A bucket can't be deleted with existing objects inside it.
81
+
* You must first `empty()` the bucket.
82
+
*
83
+
* @param id The unique identifier of the bucket you would like to delete.
79
84
*/
80
85
asyncdeleteBucket(
81
86
id: string
@@ -89,9 +94,10 @@ export class StorageApi {
89
94
}
90
95
91
96
/**
92
-
* Upload a file
93
-
* @param path the relative file path
94
-
* @param file the File content
97
+
* Uploads a file to an existing bucket.
98
+
*
99
+
* @param path The relative file path including the bucket ID. Should be of the format `bucket/folder/subfolder`. The bucket already exist before attempting to upload.
100
+
* @param file The File object to be stored in the bucket.
95
101
*/
96
102
asyncuploadFile(
97
103
path: string,
@@ -123,9 +129,10 @@ export class StorageApi {
123
129
}
124
130
125
131
/**
126
-
* Update a file
127
-
* @param path the relative file path
128
-
* @param file the File content
132
+
* Replaces an existing file at the specified path with a new one.
133
+
*
134
+
* @param path The relative file path including the bucket ID. Should be of the format `bucket/folder/subfolder`. The bucket already exist before attempting to upload.
135
+
* @param file The file object to be stored in the bucket.
129
136
*/
130
137
asyncupdateFile(
131
138
path: string,
@@ -157,20 +164,21 @@ export class StorageApi {
157
164
}
158
165
159
166
/**
160
-
* Rename a file
161
-
* @param bucketName
162
-
* @param fromPath original relative file path
163
-
* @param toPath the new relative file path
167
+
* Moves an existing file, optionally renaming it at the same time.
168
+
*
169
+
* @param bucketId The bucket which contains the file.
170
+
* @param fromPath The original file path, including the current file name. For example `folder/image.png`.
171
+
* @param toPath The new file path, including the new file name. For example `folder/image-copy.png`.
0 commit comments