Sample code for 30+ languages & platforms
Lua

Wasabi Download File

See more Wasabi Examples

Demonstrates how to download a file from a Wasabi bucket.

Chilkat Lua Downloads

Lua
local chilkat = require("chilkat")

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

local http = chilkat.Http.new()

-- Insert your access key here:
http.aws_access_key = "access-key"

-- Insert your secret key here:
http.aws_secret_key = "secret-key"

-- Use the endpoint matching the bucket's region.
http.aws_endpoint = "s3.us-west-1.wasabisys.com"

local bucketName = "chilkat-west"
local objectName = "seahorse.jpg"
local localFilePath = "c:/temp/qa_output/seahorse.jpg"

local success = http:s3_download_file(bucketName, objectName, localFilePath)
if not success then
    print(http.last_error_text)
else
    print("File downloaded.")
end