class Append extends ContentUploadAbstractOperation

Append more data to an upload session. When the parameter close is set, this call will close the session. A single request should not upload more than 150 MB of file contents.

Constants

API_VERSION

Dropbox API version

HOST

The hostname for these operations

Methods

__construct( bool $async = null, string $accessToken = null)

Operation constructor.

static 
setDefaultToken( string $token)

Sets the default token to use with the constructor

boolean
isAsync()

Return whether we're operating in async mode

setAsync( bool $async)

Sets the sync/async operation mode

static 
setDefaultAsync( bool $async)

Sets the default $async value for the constructor

PromiseInterface|ResponseInterface
raw( string|resource|StreamInterface $data, UploadSessionCursor $cursor, UploadSessionActiveOptions $options = null)

Perform the operation, returning a promise or raw response object

Details

in AbstractOperation at line line 82
__construct( bool $async = null, string $accessToken = null)

Operation constructor.

Parameters

bool $async Whether requests should be asynchronous
string $accessToken Our access token

Exceptions

NoTokenException If $accessToken is not provided and the {@link AbstractOperation::$defaultToken default token} hasn't been set via {@link AbstractOperation::setDefaultToken() setDefaultToken()}

in AbstractOperation at line line 102
final static setDefaultToken( string $token)

Sets the default token to use with the constructor

Parameters

string $token The token

in AbstractOperation at line line 122
boolean isAsync()

Return whether we're operating in async mode

Return Value

boolean

in AbstractOperation at line line 135
final AbstractOperation setAsync( bool $async)

Sets the sync/async operation mode

Parameters

bool $async true to perform operations in async mode, false to perform them in sync

Return Value

AbstractOperation

in AbstractOperation at line line 149
final static setDefaultAsync( bool $async)

Sets the default $async value for the constructor

Parameters

bool $async The default async value

at line line 38
PromiseInterface|ResponseInterface raw( string|resource|StreamInterface $data, UploadSessionCursor $cursor, UploadSessionActiveOptions $options = null)

Perform the operation, returning a promise or raw response object

Parameters

string|resource|StreamInterface $data The file contents. Can be a string, a fopen()
UploadSessionCursor $cursor The upload session cursor
UploadSessionActiveOptions $options Additional operation options

Return Value

PromiseInterface|ResponseInterface The promise interface if async is set to true and the request interface if it is set to false

Exceptions

ClientException