(AutoIt) Backblaze S3 Delete Bucket Objects
Demonstrates how to delete objects in a bucket.
The Chilkat S3 functions in the HTTP class are compatible with the Backblaze service. However, because of some specific issues, Chilkat v9.5.0.89 or later is needed.
; This example requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
Local $bSuccess
; keyID = Access Key ID or Access Key
$oHttp.AwsAccessKey = "access-key"
; applicationKey = Secret Access Key or Secret Key
$oHttp.AwsSecretKey = "secret-key"
; Region is the 2nd part of your S3 Endpoint
$oHttp.AwsEndpoint = "s3.us-west-002.backblazeb2.com"
Local $sBucketName = "chilkat-test"
Local $sObjectName1 = "seahorse.jpg"
Local $sObjectName2 = "orchard.json"
$oSa = ObjCreate("Chilkat.StringArray")
$oSa.Append($sObjectName1)
$oSa.Append($sObjectName2)
Local $oResp = $oHttp.S3_DeleteMultipleObjects($sBucketName,$oSa)
If ($oHttp.LastMethodSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
ConsoleWrite("Response status code = " & $oHttp.LastStatus & @CRLF)
; Display the XML response.
ConsoleWrite($oResp.BodyStr & @CRLF)
|