<?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: Thumbnails in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/264408#M15486</link>
    <description>&lt;P&gt;Hi again, I fixed that issue, but I have one more question that I couldn't find answer for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filesDownload or&amp;nbsp;filesGetThumbnail returns object with&amp;nbsp;fileBinary property. I can't in any way I tried convert that data to image.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Most of the time I get this exception&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Unless I do this&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;...
img.src='data&amp;amp;colon;image/jpeg;base64,' + window.btoa(unescape(encodeURIComponent(response.data.fileBinary)));
...&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;But again it is unreadable&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And here is screenshot of original fileBinary data and converted data with code above&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2018-02-11 00.15.13.png" style="width: 999px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/2360i154DF55DAFF6B569/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2018-02-11 00.15.13.png" alt="Screenshot from 2018-02-11 00.15.13.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Feb 2018 23:18:40 GMT</pubDate>
    <dc:creator>vildantursic</dc:creator>
    <dc:date>2018-02-10T23:18:40Z</dc:date>
    <item>
      <title>Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/263451#M15391</link>
      <description>&lt;P&gt;Hi, I am using dropbox V2 API (current version from npm 3.0.4). Working with VueJS / Nuxt.&lt;/P&gt;&lt;P&gt;And I am trying to&amp;nbsp;get thumbnails from dropbox folder,&lt;/P&gt;&lt;P&gt;This console message I am getting (Dropbox-sdk.min.js)&lt;/P&gt;&lt;PRE&gt;TypeError: t.buffer is not a function&lt;/PRE&gt;&lt;P&gt;And this is code I am executing&lt;/P&gt;&lt;PRE&gt;dbx.filesListFolder({ path: '/Website/1. Overview', recursive: true, include_media_info: true, include_deleted: false, include_has_explicit_shared_members: false, include_mounted_folders: false, limit: 5 })
  .then(function(response) {
    console.log(response);
    dbx.filesGetThumbnail({ path: response.entries[1].path_display, format: 'jpeg', size: 'w64h64' })
      .then(function(result) {
        window.data = result;
        console.log(result);
      })
      .catch(function(error) {
        console.log(error);
      });
  })
  .catch(function(error) {
    console.log(error);
  });&lt;/PRE&gt;&lt;P&gt;So, one thing I noticed that my files in that folder&amp;nbsp;have property with "file" value&lt;/P&gt;&lt;PRE&gt;{
 ".tag": "file"
}&lt;/PRE&gt;&lt;P&gt;should it be any of image formats "jpeg" | "png"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for any kind of answer &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:15:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/263451#M15391</guid>
      <dc:creator>vildantursic</dc:creator>
      <dc:date>2019-05-29T09:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/263604#M15407</link>
      <description>Regarding the TypeError issue, please refer to this recent JavaScript SDK issue for more information and a workaround:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/issues/172" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/issues/172&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;(Note that filesDownload and filesGetThumbnail download data in the same way.)&lt;BR /&gt;&lt;BR /&gt;The ".tag" value is expected. That identifies the type of the entry, and will be one of "file", "folder", or "deleted", not the file type. For the file type, please refer to the file extension in the path or name.&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Feb 2018 16:11:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/263604#M15407</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-02-05T16:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/264408#M15486</link>
      <description>&lt;P&gt;Hi again, I fixed that issue, but I have one more question that I couldn't find answer for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filesDownload or&amp;nbsp;filesGetThumbnail returns object with&amp;nbsp;fileBinary property. I can't in any way I tried convert that data to image.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Most of the time I get this exception&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;DOMException: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;Unless I do this&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;...
img.src='data&amp;amp;colon;image/jpeg;base64,' + window.btoa(unescape(encodeURIComponent(response.data.fileBinary)));
...&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;But again it is unreadable&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;And here is screenshot of original fileBinary data and converted data with code above&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot from 2018-02-11 00.15.13.png" style="width: 999px;"&gt;&lt;img src="https://www.dropboxforum.com/t5/image/serverpage/image-id/2360i154DF55DAFF6B569/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot from 2018-02-11 00.15.13.png" alt="Screenshot from 2018-02-11 00.15.13.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 23:18:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/264408#M15486</guid>
      <dc:creator>vildantursic</dc:creator>
      <dc:date>2018-02-10T23:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/264578#M15499</link>
      <description>It looks like you opened another thread for this, so I'll follow up there:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.dropboxforum.com/t5/API-support/Binary-to-image/m-p/264555" target="_blank"&gt;https://www.dropboxforum.com/t5/API-support/Binary-to-image/m-p/264555&lt;/A&gt;</description>
      <pubDate>Mon, 12 Feb 2018 16:30:40 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/264578#M15499</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-02-12T16:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/272824#M16203</link>
      <description>The original `t.buffer is not a function` issue should be fixed in the latest version of the library, currently v4.0.3.</description>
      <pubDate>Tue, 17 Apr 2018 15:47:42 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/272824#M16203</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-04-17T15:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/367742#M20808</link>
      <description>&lt;P&gt;not able to convert fileBinary to url in nodejs.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2019 09:34:02 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/367742#M20808</guid>
      <dc:creator>rajshree1996</dc:creator>
      <dc:date>2019-09-28T09:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Thumbnails</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/368103#M20817</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1211079"&gt;@rajshree1996&lt;/a&gt;&amp;nbsp;If you need help using the&amp;nbsp;Dropbox API/SDK, please &lt;A href="https://www.dropbox.com/developers/chooser" target="_self"&gt;open a new thread&lt;/A&gt; with more details about the issue or question. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2019 16:21:05 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Thumbnails/m-p/368103#M20817</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-09-30T16:21:05Z</dc:date>
    </item>
  </channel>
</rss>

