AutoIt
AutoIt
Wasabi Download File
See more Wasabi Examples
Demonstrates how to download a file from a Wasabi bucket.Chilkat AutoIt Downloads
Local $bSuccess = False
; This requires the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
; Insert your access key here:
$oHttp.AwsAccessKey = "access-key"
; Insert your secret key here:
$oHttp.AwsSecretKey = "secret-key"
; Use the endpoint matching the bucket's region.
$oHttp.AwsEndpoint = "s3.us-west-1.wasabisys.com"
Local $sBucketName = "chilkat-west"
Local $sObjectName = "seahorse.jpg"
Local $sLocalFilePath = "c:/temp/qa_output/seahorse.jpg"
$bSuccess = $oHttp.S3_DownloadFile($sBucketName,$sObjectName,$sLocalFilePath)
If ($bSuccess <> True) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Else
ConsoleWrite("File downloaded." & @CRLF)
EndIf