<?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 Base64 Encoded with Dropbox API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-Base64-Encoded-with-Dropbox-API/m-p/272872#M16210</link>
    <description>&lt;P&gt;Hi, I'm trying to use dropbox API for uploads images, actually I have the Base64 encoded&amp;nbsp;string of image file and I wanna use the API for upload. I try this but it doesn't work.&lt;/P&gt;&lt;PRE&gt;  curl -X POST https://content.dropboxapi.com/2/files/upload \
    --header "Authorization: Bearer &amp;lt;TOKEN&amp;gt;" \
    --header "Dropbox-API-Arg: {\"path\": \"/test/img.jpg\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary "&amp;lt;Base64 Encoded Image Here&amp;gt;"&lt;/PRE&gt;&lt;P&gt;I wanna know if I can upload images encoded in Base64.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:13:51 GMT</pubDate>
    <dc:creator>PHDev</dc:creator>
    <dc:date>2019-05-29T09:13:51Z</dc:date>
    <item>
      <title>Upload Image Base64 Encoded with Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-Base64-Encoded-with-Dropbox-API/m-p/272872#M16210</link>
      <description>&lt;P&gt;Hi, I'm trying to use dropbox API for uploads images, actually I have the Base64 encoded&amp;nbsp;string of image file and I wanna use the API for upload. I try this but it doesn't work.&lt;/P&gt;&lt;PRE&gt;  curl -X POST https://content.dropboxapi.com/2/files/upload \
    --header "Authorization: Bearer &amp;lt;TOKEN&amp;gt;" \
    --header "Dropbox-API-Arg: {\"path\": \"/test/img.jpg\",\"mode\": \"add\",\"autorename\": true,\"mute\": false}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary "&amp;lt;Base64 Encoded Image Here&amp;gt;"&lt;/PRE&gt;&lt;P&gt;I wanna know if I can upload images encoded in Base64.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:13:51 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-Base64-Encoded-with-Dropbox-API/m-p/272872#M16210</guid>
      <dc:creator>PHDev</dc:creator>
      <dc:date>2019-05-29T09:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Upload Image Base64 Encoded with Dropbox API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-Base64-Encoded-with-Dropbox-API/m-p/272874#M16211</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/663103"&gt;@PHDev&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you clarify if you are trying to store the literal Base64 encoding or if your end goal is to upload Base64 and have Dropbox store the resulting image that the Base64 data represents?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Base64 conversion is not supported by the upload API endpoints. So if you are trying to store the resulting images, you will need to "reconstitute" the image file back to its binary format&amp;nbsp;before you upload&amp;nbsp;it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If&amp;nbsp;instead, you are trying to store the literal Base64 encoding of the image, you will still need to convert that data to bytes before uploading it and then decode it when you pull it back down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Chuck&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 20:51:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Upload-Image-Base64-Encoded-with-Dropbox-API/m-p/272874#M16211</guid>
      <dc:creator>chirstius</dc:creator>
      <dc:date>2018-04-17T20:51:17Z</dc:date>
    </item>
  </channel>
</rss>

