<?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: preview my files in iframe using http core api in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136971#M4222</link>
    <description>&lt;P&gt;A bit of extra detail:&lt;/P&gt;
&lt;P&gt;The documentation for /thumbnails is here:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#thumbnails" target="_blank" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers-v1/core/docs#thumbnails&lt;/A&gt;.&amp;nbsp;The default format returned is JPEG, but you can also ask for a PNG.&lt;/P&gt;
&lt;P&gt;The documentation for /previews is here:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#previews" target="_blank" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers-v1/core/docs#previews&lt;/A&gt;. That endpoint always returns HTML or PDF (depending on the type of the original file).&amp;nbsp;So although the browser won't be able to display a Word doc directly, it should be able to display the&amp;nbsp;&lt;EM&gt;preview&lt;/EM&gt; of a Word doc, because that preview will&amp;nbsp;be either HTML or PDF.&lt;/P&gt;
&lt;P&gt;Your attempt to use a data URI will likely work if you use an img tag (not sure if an iframe will work) and actually convert the data to base64. If you can't get that working, please share your code so people can help.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2015 00:38:57 GMT</pubDate>
    <dc:creator>Steve M.</dc:creator>
    <dc:date>2015-10-29T00:38:57Z</dc:date>
    <item>
      <title>preview my files in iframe using http core api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136967#M4218</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;i am developing an application that&amp;nbsp;let user browse his file inside my web application.&lt;/P&gt;
&lt;P&gt;I'd like to let user preview&amp;nbsp;his file inside an iframe of such webapp as such as it is done in dropbox webapp when clicking on file itself.&lt;/P&gt;
&lt;P&gt;I have tryed using&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#thumbnails" rel="nofollow noreferrer" target="_blank"&gt;https://www.dropbox.com/developers-v1/core/docs#thumbnails&lt;/A&gt; and&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#previews" rel="nofollow noreferrer" target="_blank"&gt;https://www.dropbox.com/developers-v1/core/docs#previews&lt;/A&gt;, but i see a binary object is returned in my ajax call, but i do not understand how to use such data.&lt;/P&gt;
&lt;P&gt;Is there a "best practice" to achieve such result?&lt;/P&gt;
&lt;P&gt;Thanks everybody&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:39:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136967#M4218</guid>
      <dc:creator>Federico P.3</dc:creator>
      <dc:date>2019-05-29T09:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: preview my files in iframe using http core api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136968#M4219</link>
      <description>&lt;P&gt;The thumbnails and previews endpoints return the raw data for the thumbnail or preview of the requested file, respectively. You'd need to save that data and serve it back however you want. E.g., serve it at a URL to use as the src for your iframe.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 03:31:30 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136968#M4219</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-10-28T03:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: preview my files in iframe using http core api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136969#M4220</link>
      <description>&lt;P&gt;Hi Gregory,&lt;/P&gt;
&lt;P&gt;thank you for your reply. I have tryed (with thumbnail endpoint) to put raw data&amp;nbsp;as src of my iframe with no luck (got an ampty iframe). I can see, in the first part of binary data, a JFIF string so i think this data is realyy a JPEG.&lt;/P&gt;
&lt;P&gt;I wrote something like&lt;/P&gt;
&lt;P&gt;&amp;lt;iframe&amp;nbsp;src="data:image/*;base64,{{Raw Binary Data}}"/&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/P&gt;
&lt;P&gt;with no luck.&lt;/P&gt;
&lt;P&gt;Also i would like to understand if binary data returned from preview endpoint would be correctly rendered inside a normal browser (i am thinking at word documents).&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2015 15:25:12 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136969#M4220</guid>
      <dc:creator>Federico P.3</dc:creator>
      <dc:date>2015-10-28T15:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: preview my files in iframe using http core api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136970#M4221</link>
      <description>&lt;P&gt;I don't believe iframes support data: URIs as src, so you'd have to host the data at a URL like I mentioned in my last reply.&lt;/P&gt;
&lt;P&gt;As far as browser support for different file types are concerned, that would depend on the specific file type and browser capabilities, unrelated to&amp;nbsp;Dropbox itself. For example, I don't believe most browsers can natively display word documents, and would instead offer to download the file.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 00:29:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136970#M4221</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-10-29T00:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: preview my files in iframe using http core api</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136971#M4222</link>
      <description>&lt;P&gt;A bit of extra detail:&lt;/P&gt;
&lt;P&gt;The documentation for /thumbnails is here:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#thumbnails" target="_blank" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers-v1/core/docs#thumbnails&lt;/A&gt;.&amp;nbsp;The default format returned is JPEG, but you can also ask for a PNG.&lt;/P&gt;
&lt;P&gt;The documentation for /previews is here:&amp;nbsp;&lt;A href="https://www.dropbox.com/developers-v1/core/docs#previews" target="_blank" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers-v1/core/docs#previews&lt;/A&gt;. That endpoint always returns HTML or PDF (depending on the type of the original file).&amp;nbsp;So although the browser won't be able to display a Word doc directly, it should be able to display the&amp;nbsp;&lt;EM&gt;preview&lt;/EM&gt; of a Word doc, because that preview will&amp;nbsp;be either HTML or PDF.&lt;/P&gt;
&lt;P&gt;Your attempt to use a data URI will likely work if you use an img tag (not sure if an iframe will work) and actually convert the data to base64. If you can't get that working, please share your code so people can help.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2015 00:38:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/preview-my-files-in-iframe-using-http-core-api/m-p/136971#M4222</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-10-29T00:38:57Z</dc:date>
    </item>
  </channel>
</rss>

