Lianja
Lianja
Wasabi Download File
See more Wasabi Examples
Demonstrates how to download a file from a Wasabi bucket.Chilkat Lianja Downloads
llSuccess = .F.
// This requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loHttp = createobject("CkHttp")
// 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 = "chilkat-west"
lcObjectName = "seahorse.jpg"
lcLocalFilePath = "c:/temp/qa_output/seahorse.jpg"
llSuccess = loHttp.S3_DownloadFile(lcBucketName,lcObjectName,lcLocalFilePath)
if (llSuccess <> .T.) then
? loHttp.LastErrorText
else
? "File downloaded."
endif
release loHttp