Lianja
Lianja
S3 Download File
See more Amazon S3 Examples
Demonstrates how to download a file from the Amazon S3 service.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")
loHttp.AwsAccessKey = "AWS_ACCESS_KEY"
loHttp.AwsSecretKey = "AWS_SECRET_KEY"
loHttp.AwsRegion = "us-west-2"
loHttp.AwsEndpoint = "s3-us-west-2.amazonaws.com"
lcBucketName = "chilkat.qa"
lcObjectName = "/images/sea_creatures/starfish.jpg"
lcLocalFilePath = "qa_output/starfish.jpg"
llSuccess = loHttp.S3_DownloadFile(lcBucketName,lcObjectName,lcLocalFilePath)
if (llSuccess <> .T.) then
? loHttp.LastErrorText
else
? "File downloaded."
endif
release loHttp