Xbase++ Requires Chilkat v9.5.0.89+
Xbase++
Wasabi FTP Upload
See more Wasabi Examples
Demonstrates how to upload a file to Wasabi using FTP.Chilkat Xbase++ Downloads
LOCAL nSuccess
LOCAL oFtp
LOCAL cLocalFilePath
LOCAL cRemoteBucketPath
nSuccess := 0
// This example assumes the Chilkat HTTP API to have been previously unlocked.
// See Global Unlock Sample for sample code.
oFtp := CreateObject("Chilkat.Ftp2")
// Use the domain for the bucket you'll be managing.
oFtp:Hostname := "s3.s3.us-west-1.wasabisys.com"
// Use your root account username (email address) and root account password
oFtp:Username := "root_account_username"
oFtp:Password := "root_account_password"
oFtp:Ssl := 1
oFtp:Port := 990
nSuccess := oFtp:Connect()
IF (nSuccess == 0)
? oFtp:LastErrorText
oFtp:destroy()
RETURN
ENDIF
// Upload a file (starfish.jpg) to the bucket named "chilkat"
cLocalFilePath := "qa_data/jpg/starfish.jpg"
cRemoteBucketPath := "/chilkat/starfish.jpg"
nSuccess := oFtp:PutFile(cLocalFilePath, cRemoteBucketPath)
IF (nSuccess == 0)
? oFtp:LastErrorText
oFtp:destroy()
RETURN
ENDIF
? "File uploaded."
oFtp:destroy()