AWS.S3.IS3Object.UploadStream

Uploads the contents of a stream to the object.

function UploadStream(const AStream: TStream; AUseTempFiles: Boolean = False; AOnProgress: TS3UploadPartBatchProgressCallback = nil; AStreamUploader: IS3StreamUploader = nil): Boolean;
__fastcall Boolean UploadStream(const TStream AStream, Boolean AUseTempFiles = False, TS3UploadPartBatchProgressCallback AOnProgress = null, IS3StreamUploader AStreamUploader = null);

File: AWS.S3.pas 

Namespace: AWS.S3 

Module: Appercept AWS SDK for Delphi 

Parameters
Description
const AStream: TStream
A TStream instance containing data for the object.
AUseTempFiles: Boolean = False
Optional Boolean value indicating whether to use temp-files (True) or memory (False) for buffering parts. The use of temporary files reduces memory pressure when uploading large files.
AOnProgress: TS3UploadPartBatchProgressCallback = nil
An optional callback providing progress updates.
AFileUploader
An optional IS3FileUploader instance to handle the file upload.

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

// Create or load a stream of data to upload. var LStream := TMemoryStream.Create; var LObject := TS3Object.Create('my-bucket', 'my-object') as IS3Object; LObject.UploadStream( LStream, 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.