Sample code for 30+ languages & platforms
Rust

Wasabi Download File

See more Wasabi Examples

Demonstrates how to download a file from a Wasabi bucket.

Chilkat Rust Downloads

Rust

// This requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

let http = chilkat::Http::new();

// Insert your access key here:
http.set_aws_access_key("access-key");

// Insert your secret key here:
http.set_aws_secret_key("secret-key");

// Use the endpoint matching the bucket's region.
http.set_aws_endpoint("s3.us-west-1.wasabisys.com");

let bucket_name = "chilkat-west".to_string();
let object_name = "seahorse.jpg".to_string();
let local_file_path = "c:/temp/qa_output/seahorse.jpg".to_string();

if http.s3_download_file(&bucket_name, &object_name, &local_file_path).is_err() {
    println!("{}", http.last_error_text());
} else {
    println!("File downloaded.");
}