<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Upload Image with Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-with-Dropbox-API/m-p/199295#M9257</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$fields ='@'.'test.jpg';&lt;BR /&gt;$headers = array("Authorization: Bearer ".$token,'Content-Type: application/octet-stream', 'Dropbox-API-Arg: {"path":"/arun/teshhhhht.jpeg","autorename": true,"mute": false,"mode":"add"}');&lt;BR /&gt;$ch = curl_init('&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;');&lt;BR /&gt;curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);&lt;BR /&gt;curl_setopt($ch, CURLOPT_POST, true);&lt;BR /&gt;curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);&lt;BR /&gt;curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);&lt;BR /&gt;$response = curl_exec($ch);;&lt;BR /&gt;$rest1=json_decode($response,true);&lt;BR /&gt;echo "&amp;lt;pre&amp;gt;";&lt;BR /&gt;print_r($response);&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:27:24 GMT</pubDate>
    <dc:creator>ws</dc:creator>
    <dc:date>2019-05-29T09:27:24Z</dc:date>
    <item>
      <title>Upload Image with Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-with-Dropbox-API/m-p/199295#M9257</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$fields ='@'.'test.jpg';&lt;BR /&gt;$headers = array("Authorization: Bearer ".$token,'Content-Type: application/octet-stream', 'Dropbox-API-Arg: {"path":"/arun/teshhhhht.jpeg","autorename": true,"mute": false,"mode":"add"}');&lt;BR /&gt;$ch = curl_init('&lt;A href="https://content.dropboxapi.com/2/files/upload" target="_blank"&gt;https://content.dropboxapi.com/2/files/upload&lt;/A&gt;');&lt;BR /&gt;curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);&lt;BR /&gt;curl_setopt($ch, CURLOPT_POST, true);&lt;BR /&gt;curl_setopt($ch, CURLOPT_POSTFIELDS,$fields);&lt;BR /&gt;curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);&lt;BR /&gt;$response = curl_exec($ch);;&lt;BR /&gt;$rest1=json_decode($response,true);&lt;BR /&gt;echo "&amp;lt;pre&amp;gt;";&lt;BR /&gt;print_r($response);&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:27:24 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-with-Dropbox-API/m-p/199295#M9257</guid>
      <dc:creator>ws</dc:creator>
      <dc:date>2019-05-29T09:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image with Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-with-Dropbox-API/m-p/199300#M9260</link>
      <description>&lt;P&gt;It looks like you're uploading the file data as the string "@test.jpg" as opposed to&amp;nbsp;the contents of the file at test.jpg. (According to &lt;A href="https://secure.php.net/manual/en/function.curl-setopt.php" target="_self"&gt;the documentation for&amp;nbsp;CURLOPT_POSTFIELDS&lt;/A&gt;&amp;nbsp;that usage for accessing file contents is deprecated, and only works when supplying the full path.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The resulting uploaded file then won't be the expected image data, so the thumbnail call won't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's an example of uploading a file using curl in PHP here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201612231606567112687" target="_blank"&gt;https://stackoverflow.com/documentation/dropbox-api/409/uploading-a-file/1354/uploading-a-file-via-curl-in-php#t=201612231606567112687&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2016 16:11:59 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-with-Dropbox-API/m-p/199300#M9260</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-12-23T16:11:59Z</dc:date>
    </item>
  </channel>
</rss>

