Lianja
Lianja
Example: Http.S3_FileExists method
Demonstrates theS3_FileExists method.
Chilkat Lianja Downloads
loHttp = createobject("CkHttp")
// Insert your AWS keys here:
loHttp.AwsAccessKey = "AWS_ACCESS_KEY"
loHttp.AwsSecretKey = "AWS_SECRET_KEY"
lcBucketName = "chilkat.ocean"
lcObjectName = "seahorse.jpg"
loHttp.AwsRegion = "us-west-2"
loHttp.AwsEndpoint = "s3-us-west-2.amazonaws.com"
lnRetval = loHttp.S3_FileExists(lcBucketName,lcObjectName)
if (lnRetval < 0) then
? "Failed to check for the S3 object existence"
? loHttp.LastErrorText
release loHttp
return
endif
if (lnRetval = 0) then
? "The S3 object does not exist."
release loHttp
return
endif
? "The S3 object exists."
release loHttp