Hi,
When Iam uploadinh the image using the curl code.The response is 200 ok,but when iam viewing the image in the dropbox .It says unable to preview this type of images.My code is:
$fields ='@'.'test.jpg';
$headers = array("Authorization: Bearer ".$token,'Content-Type: application/octet-stream', 'Dropbox-API-Arg: {"path":"/arun/teshhhhht.jpeg","autorename": true,"mute": false,"mode":"add"}');
$ch = curl_init('https://content.dropboxapi.com/2/files/upload');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);;
$rest1=json_decode($response,true);
echo "<pre>";
print_r($response);