Google Cloud PHP shared dependency, providing functionality useful to all components. Client - Class AbstractUploader (1.60.0)

Reference documentation and code samples for the Google Cloud PHP shared dependency, providing functionality useful to all components. Client class AbstractUploader.

Provides a base impementation for uploads.

Namespace

Google \ Cloud \ Core \ Upload

Methods

__construct

Parameters
Name Description
requestWrapper Google\Cloud\Core\RequestWrapper
data string|resource|Psr\Http\Message\StreamInterface
uri string
options array

Optional configuration.

↳ metadata array

Metadata on the resource.

↳ chunkSize int

Size of the chunks to send incrementally during a resumable upload. Must be in multiples of 262144 bytes.

↳ restOptions array

HTTP client specific configuration options.

↳ requestTimeout float

Seconds to wait before timing out the request. Defaults to 0.

↳ retries int

Number of retries for a failed request. Defaults to 3.

↳ contentType string

Content type of the resource.

upload

Returns
Type Description
array

Constants

UPLOAD_TYPE_RESUMABLE

Value: 'resumable'

UPLOAD_TYPE_MULTIPART

Value: 'multipart'

UPLOAD_TYPE_STREAMABLE

Value: 'streamable'

UPLOAD_TYPE_SIGNED

Value: 'signed'

RESUMABLE_LIMIT

Value: 5000000