(JavaScript) Wasabi Delete Bucket Objects
Demonstrates how to delete one or more objects in a bucket.Note: This example requires Chilkat v11.0.0 or greater.
var success = false;
// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
var http = new CkHttp();
// Insert your access key here:
http.AwsAccessKey = "access-key";
// Insert your secret key here:
http.AwsSecretKey = "secret-key";
// Use the endpoint matching the bucket's region.
http.AwsEndpoint = "s3.us-west-1.wasabisys.com";
var bucketName = "chilkattest";
var objectName1 = "seahorse.jpg";
var objectName2 = "seahorse2.jpg";
var st = new CkStringTable();
st.Append(objectName1);
st.Append(objectName2);
var resp = new CkHttpResponse();
success = http.S3_DeleteObjects(bucketName,st,resp);
if (success == false) {
console.log(http.LastErrorText);
return;
}
console.log("Response status code = " + http.LastStatus);
// Display the XML response.
console.log(resp.BodyStr);
|