C#
C#
Example: Http.S3_DownloadBd method
See more Amazon S3 Examples
Demonstrates theS3_DownloadBd method.
Chilkat C# Downloads
bool success = false;
// This requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Chilkat.Http http = new Chilkat.Http();
http.AwsAccessKey = "AWS_ACCESS_KEY";
http.AwsSecretKey = "AWS_SECRET_KEY";
http.AwsRegion = "us-west-2";
http.AwsEndpoint = "s3-us-west-2.amazonaws.com";
string bucketName = "chilkat.qa";
string objectName = "/images/sea_creatures/starfish.jpg";
string localFilePath = "qa_output/starfish.jpg";
Chilkat.BinData bd = new Chilkat.BinData();
success = http.S3_DownloadBd(bucketName,objectName,bd);
if (success == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
Debug.WriteLine("Downloaded " + Convert.ToString(bd.NumBytes) + " bytes");