This repository was archived by the owner on Apr 18, 2019. It is now read-only.

Description
Dear @benthedesigner ,
I'm having an error when running putFile.php.
The error message that appears is as follows:
Catchable fatal error: Object of class stdClass could not be converted to string in C:\xampp\htdocs\dropbox\new\Dropbox\OAuth\Consumer\Curl.php on line 103
But I tried to change $response['body']->error on \Dropbox\OAuth\Consumer\Curl.php file at line 103 be as follows:
$message = $response['body']->error->file . ' (Status Code: ' . $response['code'] . ')';
And the exception that appears now is "Expecting a file upload".
Here is the putFile.php which I modified:
require_once('bootstrap.php');
try {
$tmp = tempnam('/tmp', 'dropbox');
$data = 'This file was uploaded using the Dropbox API!';
file_put_contents($tmp, $data);
$put = $dropbox->putFile($tmp, 'api_upload_test.txt');
unlink($tmp);
var_dump($put);
} catch (\Dropbox\Exception $e) {
var_dump($e);
}
Here is the output:
