(Visual FoxPro) 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.
LOCAL lnSuccess
LOCAL loHttp
LOCAL lcBucketName
LOCAL lcObjectName1
LOCAL lcObjectName2
LOCAL loSt
LOCAL loResp
lnSuccess = 0
* This example requires the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
loHttp = CreateObject('Chilkat.Http')
* Insert your access key here:
loHttp.AwsAccessKey = "access-key"
* Insert your secret key here:
loHttp.AwsSecretKey = "secret-key"
* Use the endpoint matching the bucket's region.
loHttp.AwsEndpoint = "s3.us-west-1.wasabisys.com"
lcBucketName = "chilkattest"
lcObjectName1 = "seahorse.jpg"
lcObjectName2 = "seahorse2.jpg"
loSt = CreateObject('Chilkat.StringTable')
loSt.Append(lcObjectName1)
loSt.Append(lcObjectName2)
loResp = CreateObject('Chilkat.HttpResponse')
lnSuccess = loHttp.S3_DeleteObjects(lcBucketName,loSt,loResp)
IF (lnSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loSt
RELEASE loResp
CANCEL
ENDIF
? "Response status code = " + STR(loHttp.LastStatus)
* Display the XML response.
? loResp.BodyStr
RELEASE loHttp
RELEASE loSt
RELEASE loResp
|