<?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 Re: How do I display the image data from the /2/files/download endpoint? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199635#M9302</link>
    <description>The /download call returns the raw binary data for the file. If it's an image and you won't to display it in an image tag, you'll need to either save it somewhere where you can serve it from a URL, or encode and format it as a base64 data URI, or perhaps using some of the newer blob/file functionality in modern browsers.</description>
    <pubDate>Wed, 28 Dec 2016 02:06:09 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-12-28T02:06:09Z</dc:date>
    <item>
      <title>How do I display the image data from the /2/files/download endpoint?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199624#M9295</link>
      <description>&lt;P&gt;So I'm authorizing it properly, providing the correct headers in the proper format,&amp;nbsp;retriving the response headers, and the data. But I can't seem to figure out how to display the information that&amp;nbsp;comes out, it just comes out as a huge chunk of this:&lt;/P&gt;&lt;P&gt;$.ajax(.........success: (data, textStatus, request) //data below&lt;/P&gt;&lt;P&gt;&amp;nbsp;�)��y&amp;#20;Jq��i�ǈ�q`&amp;#2;��&amp;#20;�K��&amp;#2;�8�&amp;#14;�&amp;#20;ccx���&amp;#4;�R�&amp;#24;I�̼��������)|�x:qC�2 �z�F&amp;#8;�H;�&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now clearly this is the data itself, but it doesn't work when I drop it into the src attritbute directly like this (using react):&amp;nbsp;&amp;lt;img src={data} /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've spent a few hours trying to figure out how to get this to work, trying multiple solutions without success, and I'm sure it's something simple. Any help would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:27:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199624#M9295</guid>
      <dc:creator>cloudlife</dc:creator>
      <dc:date>2019-05-29T09:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the image data from the /2/files/download endpoint?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199635#M9302</link>
      <description>The /download call returns the raw binary data for the file. If it's an image and you won't to display it in an image tag, you'll need to either save it somewhere where you can serve it from a URL, or encode and format it as a base64 data URI, or perhaps using some of the newer blob/file functionality in modern browsers.</description>
      <pubDate>Wed, 28 Dec 2016 02:06:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199635#M9302</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-12-28T02:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I display the image data from the /2/files/download endpoint?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199748#M9327</link>
      <description>Thanks! That's really what I needed was what kind of data it was, and what kind of solutions there were.&lt;BR /&gt;&lt;BR /&gt;I had already seen a possible solution using blobs, but the solution required that I send a response header for blob which potentially along with other things didn't end up working.&lt;BR /&gt;&lt;BR /&gt;The simple solution is: go install whatwg-fetch and use that for your api calls and when you get the response run:&lt;BR /&gt;URL.createObjectURL( response.blob() )&lt;BR /&gt;and set that result as the image src attribute.&lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
      <pubDate>Wed, 28 Dec 2016 23:37:44 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/How-do-I-display-the-image-data-from-the-2-files-download/m-p/199748#M9327</guid>
      <dc:creator>cloudlife</dc:creator>
      <dc:date>2016-12-28T23:37:44Z</dc:date>
    </item>
  </channel>
</rss>

