AWS.S3.IS3FileUploader.Upload

Upload a file to an object in an S3 bucket.

function Upload(const AFilePath: string; const ABucket: string; const AKey: string; AUseTempFiles: Boolean = False; AOnProgress: TS3UploadPartBatchProgressCallback = nil): Boolean;
__fastcall Boolean Upload(const AnsiString AFilePath, const AnsiString ABucket, const AnsiString AKey, Boolean AUseTempFiles = False, TS3UploadPartBatchProgressCallback AOnProgress = null);

File: AWS.S3.pas 

Namespace: AWS.S3 

Module: Appercept AWS SDK for Delphi 

Parameters
Description
const AFilePath: string
A path to a file to upload.
const ABucket: string
The name of a bucket to upload to.
const AKey: string
An object key to use for the uploaded file.
AOnProgress: TS3UploadPartBatchProgressCallback = nil
A callback providing progress updates.

A Boolean value indicating success (True) or failure (False) of the upload.

var S3 := TS3Client.Create; var LUploader := TS3FileUploader.Create(S3) as IS3FileUploader; LUploader.Upload( '/path/to/file', 'a-destination-bucket', 'a-destination-key' False, procedure(const AUploadId: string; APartNumber: Integer; APartSize, APartWriteCount, AOverallSize, AOverallWriteCount: Int64; var AAbort: Boolean) begin // Update your user interface with current progress. end );
Copyright © 2019-2021 Appercept Ltd. All rights reserved.