Google Cloud PHP shared dependency, providing functionality useful to all components. Client - Class ResumableUploader (1.72.2) (original) (raw)

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

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

Resumable upload implementation.

Namespace

Google \ Cloud \ Core \ Upload

Methods

__construct

Parameters
Name Description
requestWrapper Google\Cloud\Core\RequestWrapper
data string|resource
uri string
options array Optional configuration.
↳ metadata array Metadata on the resource.
↳ uploadProgressCallback callable The given callable function/method will be called after each successfully uploaded chunk. The callable function/method will receive the number of uploaded bytes after each uploaded chunk as a parameter to this callable. It's useful if you want to create a progress bar when using resumable upload type together with chunkSizeparameter.IfchunkSize parameter. If chunkSizeparameter.IfchunkSize is not set the callable function/method will be called only once after the successful file upload.
↳ 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.
↳ retries int Number of retries for a failed request. Defaults to 3.
↳ contentType string Content type of the resource.

getResumeUri

Gets the resume URI.

Returns
Type Description
string

resume

Resumes a download using the provided URI.

Parameter
Name Description
resumeUri string
Returns
Type Description
array

upload

Returns
Type Description
array

uploadAsync

Currently only the MultiPartUploader supports async.

Any calls to this will throw a generic Google Exception.

Returns
Type Description
GuzzleHttp\Promise\PromiseInterface

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-06-03 UTC.