SDK for PHP 3.x

MultipartUploader extends AbstractUploader
in package

Encapsulates the execution of a multipart upload to Glacier.

Table of Contents

Constants

PART_MIN_SIZE  = 1048576

Methods

__construct()  : mixed
Creates a multipart upload for a Glacier archive.
getStateFromService()  : UploadState
Creates an UploadState object for a multipart upload by querying the service for the specified upload's information.

Constants

PART_MIN_SIZE

public mixed PART_MIN_SIZE = 1048576

Methods

__construct()

Creates a multipart upload for a Glacier archive.

public __construct(GlacierClient $client, mixed $source[, array<string|int, mixed> $config = [] ]) : mixed

The valid configuration options are as follows:

  • account_id: (string, default=string('-')) Account ID for the archive being uploaded, if different from the account making the request.
  • archive_description: (string) Description of the archive.
  • before_complete: (callable) Callback to invoke before the CompleteMultipartUpload operation. The callback should have a function signature like function (Aws\Command $command) {...}.
  • before_initiate: (callable) Callback to invoke before the InitiateMultipartUpload operation. The callback should have a function signature like function (Aws\Command $command) {...}.
  • before_upload: (callable) Callback to invoke before any UploadMultipartPart operations. The callback should have a function signature like function (Aws\Command $command) {...}.
  • concurrency: (int, default=int(3)) Maximum number of concurrent UploadMultipartPart operations allowed during the multipart upload.
  • part_size: (int, default=int(1048576)) Part size, in bytes, to use when doing a multipart upload. This must between 1 MB and 4 GB, and must be a power of 2 (in megabytes).
  • prepare_data_source: (callable) Callback to invoke before starting the multipart upload workflow. The callback should have a function signature like function () {...}.
  • state: (Aws\Multipart\UploadState) An object that represents the state of the multipart upload and that is used to resume a previous upload. When this options is provided, the account_id, key, and part_size options are ignored.
  • vault_name: (string, required) Vault name to use for the archive being uploaded.
Parameters
$client : GlacierClient

Client used for the upload.

$source : mixed

Source of the data to upload.

$config : array<string|int, mixed> = []

Configuration used to perform the upload.

getStateFromService()

Creates an UploadState object for a multipart upload by querying the service for the specified upload's information.

public static getStateFromService(GlacierClient $client, string $vaultName, string $uploadId[, string $accountId = '-' ]) : UploadState
Parameters
$client : GlacierClient

GlacierClient object to use.

$vaultName : string

Vault name for the multipart upload.

$uploadId : string

Upload ID for the multipart upload.

$accountId : string = '-'

Account ID for the multipart upload.

Return values
UploadState
On this page