Delete Object

Delete a Single Object

The following SDK method can be used to delete a single object from the bucket.

copy
bucketInstance.getObject("SunSet.jpeg", "2823000000044005", //Replace this with your Object Name and Object ID
    {
        object -> object.delete(
        {
            println("Object Deletion Success.")
        },
        {
            println("Failed to delete the object. $it")
        }
   )

Delete Multiple Objects

The following SDK method can be used to delete multiple objects from the bucket.

Parameters Used

Parameter Name Data Type Definition
objects ArrayList<ZCatalystObject> An array containing the list of objects (and version IDs, if Versioning is enabled for the bucket) that needs to be deleted.
copy
bucketInstance.getObjects( success = { objects, resInfo ->
	bucketInstance.deleteObjects(objects, 
     {
	      println("DELETE BULK OBJECTS : SUCCESS"),
      }, 
      {
            println("Delete Objects Failed: $it")
      }
)

Last Updated 2025-08-28 12:01:44 +0530 IST