public/wordpress/wp-content/plugins/backupbuddy/destinations/dropbox2/lib/Dropbox/Client.php
/**
     * Start a new chunked upload session and upload the first chunk of data.
     *
     * @param string $data
     *     The data to start off the chunked upload session.
     *
     * @return array
     *     A pair of <code>(string $uploadId, int $byteOffset)</code>.  <code>$uploadId</code>
     *     is a unique identifier for this chunked upload session.  You pass this in to
     *     {@link chunkedUploadContinue} and {@link chuunkedUploadFinish}.  <code>$byteOffset</code>
     *     is the number of bytes that were successfully uploaded.
     *
     * @throws Exception
     */
Start a new chunked upload session and upload the first chunk of data.
@param string $data
The data to start off the chunked upload session.

@return array
A pair of (string $uploadId, int $byteOffset).  $uploadId
is a unique identifier for this chunked upload session.  You pass this in to
chunkedUploadContinue and  chuunkedUploadFinish.  $byteOffset
is the number of bytes that were successfully uploaded.

@throws Exception
Start a new chunked upload session and upload the first chunk of data . @param string $data The data to start off the chunked upload session . @return array A pair of ( string $uploadId int $byteOffset ) . $uploadId is a unique identifier for this chunked upload session . You pass this in to chunkedUploadContinue and chuunkedUploadFinish . $byteOffset is the number of bytes that were successfully uploaded . @throws Exception
function chunkedUploadStart($data)
    {
    		\pb_backupbuddy::status( 'details', 'chunkedUploadStart start.' );
        Checker::argString("data", $data);
        $response = $this->_chunkedUpload(array(), $data);
        \pb_backupbuddy::status( 'details', 'chunkedUploadStart response: `' . print_r( $response, true ) . '`.' );
        if ($response->statusCode === 404) {
            throw new Exception_BadResponse("Got a 404, but we didn't send up an 'session_id'");
        }
        $correction = self::_chunkedUploadCheckForOffsetCorrection($response);
        if ($correction !== null) throw new Exception_BadResponse(
            "Got an offset-correcting 400 response, but we didn't send an offset");
        if ($response->statusCode !== 200) throw RequestUtil::unexpectedStatus($response);
        list($uploadId, $byteOffset) = self::_chunkedUploadParse200Response($response->body);
        $len = strlen($data);
        	\pb_backupbuddy::status( 'details', 'Finished chunkedUploadStart.' );
        return $uploadId;
    }
function chunkedUploadStart ( $ data ) { \ pb_backupbuddy :: status ( 'details' , 'chunkedUploadStart start.' ) ; Checker :: argString ( " data " , $ data ) ; $ response = $ this -> _chunkedUpload ( array ( ) , $ data ) ; \ pb_backupbuddy :: status ( 'details' , 'chunkedUploadStart response: `' . print_r ( $ response , true ) . '`.' ) ; if ( $ response -> statusCode === 404 ) { throw new Exception_BadResponse ( " Got a 404, but we didn't send up an 'session_id' " ) ; } $ correction = self :: _chunkedUploadCheckForOffsetCorrection ( $ response ) ; if ( $ correction !== null ) throw new Exception_BadResponse ( " Got an offset-correcting 400 response, but we didn't send an offset " ) ; if ( $ response -> statusCode !== 200 ) throw RequestUtil :: unexpectedStatus ( $ response ) ; list ( $ uploadId , $ byteOffset ) = self :: _chunkedUploadParse200Response ( $ response -> body ) ; $ len = strlen ( $ data ) ; \ pb_backupbuddy :: status ( 'details' , 'Finished chunkedUploadStart.' ) ; return $ uploadId ; }
Start a new chunked upload session and upload the first chunk of data.
Start a new chunked upload session and upload the first chunk of data .
//if ($byteOffset !== $len) throw new Exception_BadResponse( //    "We sent $len bytes, but server returned an offset of $byteOffset");