File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -86,22 +86,19 @@ export class ObjectsManager {
8686 }
8787
8888 /**
89- * Deletes multiple objects .
89+ * Delete an object from the storage .
9090 *
91- * @param objects - An array of object IDs
91+ * @param object - An array of object IDs
9292 *
9393 * @example
9494 * ```js
95- * blob.objects.delete([
96- * "userId/prefix/name1_xxx-xxx.mp4",
97- * "userId/prefix/name_xxx-xxx-xxx.png"
98- * ]);
95+ * blob.object.delete("userId/prefix/name1_xxx-xxx.mp4");
9996 * ```
10097 */
101- async delete ( objects : string [ ] ) {
98+ async delete ( object : string ) {
10299 const { status } = await this . client . api . request ( "objects" , {
103100 method : "DELETE" ,
104- body : { objects } ,
101+ body : { object } ,
105102 } ) ;
106103
107104 return status === "success" ;
Original file line number Diff line number Diff line change 11import { blob } from "./index.test" ;
22
3- const objectsToDelete : string [ ] = [ ] ;
3+ const objectToDelete : string = "test.png" ;
44
5- // Delete objects
6-
7- blob . objects . delete ( objectsToDelete ) . then ( console . log ) ;
5+ // Delete object
6+ blob . objects . delete ( objectToDelete ) . then ( console . log ) ;
You can’t perform that action at this time.
0 commit comments