![]() |
Chilkat HOME Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi DLL Go Java Node.js Objective-C PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(DataFlex) Example: Http.S3_DownloadBd methodSee more Amazon S3 ExamplesDemonstrates theS3_DownloadBd method.
Use ChilkatAx-win32.pkg Procedure Test Boolean iSuccess Handle hoHttp String sBucketName String sObjectName String sLocalFilePath Variant vBd Handle hoBd String sTemp1 Integer iTemp1 Move False To iSuccess // This requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatHttp)) To hoHttp If (Not(IsComObjectCreated(hoHttp))) Begin Send CreateComObject of hoHttp End Set ComAwsAccessKey Of hoHttp To "AWS_ACCESS_KEY" Set ComAwsSecretKey Of hoHttp To "AWS_SECRET_KEY" Set ComAwsRegion Of hoHttp To "us-west-2" Set ComAwsEndpoint Of hoHttp To "s3-us-west-2.amazonaws.com" Move "chilkat.qa" To sBucketName Move "/images/sea_creatures/starfish.jpg" To sObjectName Move "qa_output/starfish.jpg" To sLocalFilePath Get Create (RefClass(cComChilkatBinData)) To hoBd If (Not(IsComObjectCreated(hoBd))) Begin Send CreateComObject of hoBd End Get pvComObject of hoBd to vBd Get ComS3_DownloadBd Of hoHttp sBucketName sObjectName vBd To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoHttp To sTemp1 Showln sTemp1 Procedure_Return End Get ComNumBytes Of hoBd To iTemp1 Showln "Downloaded " iTemp1 " bytes" End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.