public/wordpress/wp-content/plugins/backupbuddy/destinations/dropbox2/lib/Dropbox/Client.php
/**
     * Append another chunk data to a previously-started chunked upload session.
     *
     * @param string $uploadId
     *     The unique identifier for the chunked upload session.  This is obtained via
     *     {@link chunkedUploadStart}.
     *
     * @param int $byteOffset
     *     The number of bytes you think you've already uploaded to the given chunked upload
     *     session.  The server will append the new chunk of data after that point.
     *
     * @param string $data
     *     The data to append to the existing chunked upload session.
     *
     * @return int|bool
     *     If <code>false</code>, it means the server didn't know about the given
     *     <code>$uploadId</code>.  This may be because the chunked upload session has expired
     *     (they last around 24 hours).
     *     If <code>true</code>, the chunk was successfully uploaded.  If an integer, it means
     *     you and the server don't agree on the current <code>$byteOffset</code>.  The returned
     *     integer is the server's internal byte offset for the chunked upload session.  You need
     *     to adjust your input to match.
     *
     * @throws Exception
     */
Append another chunk data to a previously-started chunked upload session.
@param string $uploadId
The unique identifier for the chunked upload session.  This is obtained via
chunkedUploadStart.

@param int $byteOffset
The number of bytes you think you've already uploaded to the given chunked upload
session.  The server will append the new chunk of data after that point.

@param string $data
The data to append to the existing chunked upload session.

@return int|bool
If false, it means the server didn't know about the given
$uploadId.  This may be because the chunked upload session has expired
(they last around 24 hours).
If true, the chunk was successfully uploaded.  If an integer, it means
you and the server don't agree on the current $byteOffset.  The returned
integer is the server's internal byte offset for the chunked upload session.  You need
to adjust your input to match.

@throws Exception
Append another chunk data to a previously - started chunked upload session . @param string $uploadId The unique identifier for the chunked upload session . This is obtained via chunkedUploadStart . @param int $byteOffset The number of bytes you think you ' ve already uploaded to the given chunked upload session . The server will append the new chunk of data after that point . @param string $data The data to append to the existing chunked upload session . @return int|bool If false it means the server didn ' t know about the given $uploadId . This may be because the chunked upload session has expired ( they last around 24 hours ) . If true the chunk was successfully uploaded . If an integer it means you and the server don ' t agree on the current $byteOffset . The returned integer is the server ' s internal byte offset for the chunked upload session . You need to adjust your input to match . @throws Exception
function chunkedUploadContinue($uploadId, $byteOffset, $data)
    {
    		\pb_backupbuddy::status( 'details', 'chunkedUploadContinue start to ID `' . $uploadId . '`, offset `' . $byteOffset . '`.' );
        Checker::argStringNonEmpty("uploadId", $uploadId);
        Checker::argNat("byteOffset", $byteOffset);
        Checker::argString("data", $data);
        $response = $this->_chunkedUploadContinue(
            array("session_id" => $uploadId, "offset" => $byteOffset),
            $data
        );
        \pb_backupbuddy::status( 'details', 'Back in chunkedUploadContinue from _chunkedUploadContinue. Response: ' . print_r( $response, true ) );
        if ($response->statusCode === 404) {
                        return false;
        }
        if ($response->statusCode !== 200) throw RequestUtil::unexpectedStatus($response);
        $nextByteOffset = $byteOffset + strlen($data);
        \pb_backupbuddy::status( 'details', 'Next byte offset calculated by client lib: `' . $nextByteOffset . '`.' );
        return true;
    }
function chunkedUploadContinue ( $ uploadId , $ byteOffset , $ data ) { \ pb_backupbuddy :: status ( 'details' , 'chunkedUploadContinue start to ID `' . $ uploadId . '`, offset `' . $ byteOffset . '`.' ) ; Checker :: argStringNonEmpty ( " uploadId " , $ uploadId ) ; Checker :: argNat ( " byteOffset " , $ byteOffset ) ; Checker :: argString ( " data " , $ data ) ; $ response = $ this -> _chunkedUploadContinue ( array ( " session_id " => $ uploadId , " offset " => $ byteOffset ) , $ data ) ; \ pb_backupbuddy :: status ( 'details' , 'Back in chunkedUploadContinue from _chunkedUploadContinue. Response: ' . print_r ( $ response , true ) ) ; if ( $ response -> statusCode === 404 ) { return false ; } if ( $ response -> statusCode !== 200 ) throw RequestUtil :: unexpectedStatus ( $ response ) ; $ nextByteOffset = $ byteOffset + strlen ( $ data ) ; \ pb_backupbuddy :: status ( 'details' , 'Next byte offset calculated by client lib: `' . $ nextByteOffset . '`.' ) ; return true ; }
Append another chunk data to a previously-started chunked upload session.
Append another chunk data to a previously - started chunked upload session .
// The server doesn't know our upload ID.  Maybe it expired?
