SDK for PHP 3.x

ObjectUploader
in package
implements PromisorInterface

Uploads an object to S3, using a PutObject command or a multipart upload as appropriate.

Table of Contents

Interfaces

PromisorInterface
Interface used with classes that return a promise.

Constants

DEFAULT_MULTIPART_THRESHOLD  = 16777216

Methods

__construct()  : mixed
promise()  : PromiseInterface
Returns a promise.
upload()  : mixed

Constants

DEFAULT_MULTIPART_THRESHOLD

public mixed DEFAULT_MULTIPART_THRESHOLD = 16777216

Methods

__construct()

public __construct(S3ClientInterface $client, string $bucket, string $key, mixed $body[, string $acl = 'private' ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$client : S3ClientInterface

The S3 Client used to execute the upload command(s).

$bucket : string

Bucket to upload the object, or an S3 access point ARN.

$key : string

Key of the object.

$body : mixed

Object data to upload. Can be a StreamInterface, PHP stream resource, or a string of data to upload.

$acl : string = 'private'

ACL to apply to the copy (default: private).

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

Options used to configure the copy process. Options passed in through 'params' are added to the sub command(s).

upload()

public upload() : mixed
On this page