<?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: get thumbnail from myfiles in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-thumbnail-from-myfiles/m-p/281621#M17239</link>
    <description>&lt;P&gt;Using&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail" target="_blank"&gt;/2/files/get_thumbnail&lt;/A&gt; as you're doing here is the correct way to retrieve a thumbnail for a file from the&amp;nbsp;Dropbox API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Per &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail" target="_blank"&gt;the documentation&lt;/A&gt;, you can specify a 'format' parameter to request either 'jpeg' or 'png' for the format of the thumbnail. You're not specifying that, so you'll get the default of 'jpeg'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#content-download-endpoints" target="_blank"&gt;"content-download" endpoint&lt;/A&gt;, so the HTTP response body itself will contain the requested data, in this case, the raw data for the thumbnail. In your code, that's available in the 'data' parameter given to the 'done' callback function. Exactly what you do with that data is up to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that we do offer and&amp;nbsp;recommend using &lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;the official Dropbox API v2 JavaScript SDK&lt;/A&gt; instead. That has a corresponding&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesGetThumbnail__anchor" target="_blank"&gt;filesGetThumbnail method&lt;/A&gt;&amp;nbsp;that you can use instead of calling the endpoint directly.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jun 2018 16:07:56 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-06-22T16:07:56Z</dc:date>
    <item>
      <title>get thumbnail from myfiles</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-thumbnail-from-myfiles/m-p/281577#M17231</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get thumbnail of my dropbox files via api but I am not getting how can I show same or in what result I can access the same. Please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In which format I would get thumbnails, where and how will I show it to Img tag&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;function getDocumentThumbnail(name, fileName, userObjectID, $callingFunctionSuccess) {
    var path = getDropboxPath(userObjectID);

    var params = {
        path: path + fileName
    }
    $.ajax({
        cache: false,
        type: 'POST',
        url: 'https://content.dropboxapi.com/2/files/get_thumbnail',
        processData: false,
        contentType: 'application/octet-stream',
        headers: {
            'Authorization': 'Bearer ' + Tenacious.authentication.getEmpData().DropboxToken,
            'dropbox-API-Arg': JSON.stringify(params),
        },
    }).done(function (data, e) {

    }).fail(function (data) {

    });
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 May 2019 09:12:23 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-thumbnail-from-myfiles/m-p/281577#M17231</guid>
      <dc:creator>mitr1887</dc:creator>
      <dc:date>2019-05-29T09:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: get thumbnail from myfiles</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-thumbnail-from-myfiles/m-p/281621#M17239</link>
      <description>&lt;P&gt;Using&amp;nbsp;&lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail" target="_blank"&gt;/2/files/get_thumbnail&lt;/A&gt; as you're doing here is the correct way to retrieve a thumbnail for a file from the&amp;nbsp;Dropbox API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Per &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail" target="_blank"&gt;the documentation&lt;/A&gt;, you can specify a 'format' parameter to request either 'jpeg' or 'png' for the format of the thumbnail. You're not specifying that, so you'll get the default of 'jpeg'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#content-download-endpoints" target="_blank"&gt;"content-download" endpoint&lt;/A&gt;, so the HTTP response body itself will contain the requested data, in this case, the raw data for the thumbnail. In your code, that's available in the 'data' parameter given to the 'done' callback function. Exactly what you do with that data is up to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, note that we do offer and&amp;nbsp;recommend using &lt;A href="https://github.com/dropbox/dropbox-sdk-js" target="_blank"&gt;the official Dropbox API v2 JavaScript SDK&lt;/A&gt; instead. That has a corresponding&amp;nbsp;&lt;A href="https://dropbox.github.io/dropbox-sdk-js/Dropbox.html#filesGetThumbnail__anchor" target="_blank"&gt;filesGetThumbnail method&lt;/A&gt;&amp;nbsp;that you can use instead of calling the endpoint directly.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jun 2018 16:07:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-thumbnail-from-myfiles/m-p/281621#M17239</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-06-22T16:07:56Z</dc:date>
    </item>
  </channel>
</rss>

