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