Xojo Plugin
Xojo Plugin
Example: Http.S3_FileExists method
Demonstrates theS3_FileExists method.
Chilkat Xojo Plugin Downloads
Dim http As New Chilkat.Http
// Insert your AWS keys here:
http.AwsAccessKey = "AWS_ACCESS_KEY"
http.AwsSecretKey = "AWS_SECRET_KEY"
Dim bucketName As String
bucketName = "chilkat.ocean"
Dim objectName As String
objectName = "seahorse.jpg"
http.AwsRegion = "us-west-2"
http.AwsEndpoint = "s3-us-west-2.amazonaws.com"
Dim retval As Int32
retval = http.S3_FileExists(bucketName,objectName)
If (retval < 0) Then
System.DebugLog("Failed to check for the S3 object existence")
System.DebugLog(http.LastErrorText)
Return
End If
If (retval = 0) Then
System.DebugLog("The S3 object does not exist.")
Return
End If
System.DebugLog("The S3 object exists.")