<?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: Api v2 for filesGetThumbnail gives t.buffer not a function error in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267803#M15756</link>
    <description>&lt;P&gt;What environment is this running in?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some potentially related threads here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/issues/178" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/issues/178&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.dropboxforum.com/t5/API-support/utilisation-de-l-API-filesGetThumbnail/m-p/267013" target="_blank"&gt;https://www.dropboxforum.com/t5/API-support/utilisation-de-l-API-filesGetThumbnail/m-p/267013&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.dropboxforum.com/t5/API-support/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/264234" target="_blank"&gt;https://www.dropboxforum.com/t5/API-support/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/264234&lt;/A&gt;&lt;/LI&gt;
&lt;LI&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;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 07 Mar 2018 16:28:10 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2018-03-07T16:28:10Z</dc:date>
    <item>
      <title>Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267666#M15747</link>
      <description>&lt;P&gt;Hi, when i try to get thumbnail for&amp;nbsp;any file inside my folder i have the same error for different types os files (svg, png, ...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  import { Dropbox } from 'dropbox';&lt;BR /&gt;&lt;BR /&gt;  let dbx = new Dropbox({ accessToken: 'my-key' });

    dbx.filesListFolder({path: '/vector'})
      .then(function(response) {
        console.log("file :" response.entries[0].path_display);

        dbx.filesGetThumbnail({ path: response.entries[0].path_display })
        .then(function(response) {
          var fileUrl = URL.createObjectURL(response.fileBlob);
          var img = document.createElement('img');
          img.setAttribute('src', fileUrl);
          document.getElementById('results').appendChild(img);
        })
        .catch(function(error) {
          console.log(error);
        });&lt;/PRE&gt;&lt;P&gt;Every time have&amp;nbsp;this error on console&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;file: /vector/carro_preview.png&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my-file.ts:47 TypeError:&lt;STRONG&gt; t.buffer is not a function&lt;/STRONG&gt;&lt;BR /&gt;at Dropbox-sdk.min.js:1&lt;BR /&gt;at Dropbox-sdk.min.js:1&lt;BR /&gt;at t.invoke (polyfills.js:3)&lt;BR /&gt;at Object.onInvoke (core.js:4629)&lt;BR /&gt;at t.invoke (polyfills.js:3)&lt;BR /&gt;at r.run (polyfills.js:3)&lt;BR /&gt;at polyfills.js:3&lt;BR /&gt;at t.invokeTask (polyfills.js:3)&lt;BR /&gt;at Object.onInvokeTask (core.js:4620)&lt;BR /&gt;at t.invokeTask (polyfills.js:3)&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:14:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267666#M15747</guid>
      <dc:creator>pouic</dc:creator>
      <dc:date>2019-05-29T09:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267803#M15756</link>
      <description>&lt;P&gt;What environment is this running in?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are some potentially related threads here:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://github.com/dropbox/dropbox-sdk-js/issues/178" target="_blank"&gt;https://github.com/dropbox/dropbox-sdk-js/issues/178&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.dropboxforum.com/t5/API-support/utilisation-de-l-API-filesGetThumbnail/m-p/267013" target="_blank"&gt;https://www.dropboxforum.com/t5/API-support/utilisation-de-l-API-filesGetThumbnail/m-p/267013&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://www.dropboxforum.com/t5/API-support/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/264234" target="_blank"&gt;https://www.dropboxforum.com/t5/API-support/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/264234&lt;/A&gt;&lt;/LI&gt;
&lt;LI&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;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 07 Mar 2018 16:28:10 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267803#M15756</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-03-07T16:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267838#M15766</link>
      <description>I’m using ionic 2 with angular</description>
      <pubDate>Wed, 07 Mar 2018 20:25:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267838#M15766</guid>
      <dc:creator>pouic</dc:creator>
      <dc:date>2018-03-07T20:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267841#M15769</link>
      <description>Thanks! Those are probably relevant then. Can you try including the Dropbox library as a JavaScript library instead of a Node dependency?</description>
      <pubDate>Wed, 07 Mar 2018 20:37:08 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267841#M15769</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-03-07T20:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267863#M15773</link>
      <description>&lt;P&gt;If import the DropboxSDK library like script import on my html works fine &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my solution:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;index.html ( add dropbox-sdk manually)&lt;/P&gt;
&lt;PRE&gt;  &amp;lt;script src="assets/js/dropbox-sdk.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;
&lt;P&gt;On page where can use dropbox&amp;nbsp;(index.ts)&lt;/P&gt;
&lt;PRE&gt;declare var Dropbox: any;


  var dbx = new Dropbox.Dropbox({ accessToken: 'MY-KEY' });
   
    dbx.filesListFolder({path: '/my-folder-name'})
      .then(function(response) {

       dbx.filesGetThumbnail({ path: response.entries[0].path_display, format: 'png', size: 'w128h128' })
        .then(function(response) {
          var img = document.createElement('img');
          img.src=window.URL.createObjectURL(response.fileBlob);
          document.getElementById('results').appendChild(img);

        })
        .catch(function(error) {
          console.log(error);
        });
      
    });
  }&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 22:54:43 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/267863#M15773</guid>
      <dc:creator>pouic</dc:creator>
      <dc:date>2018-03-07T22:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Api v2 for filesGetThumbnail gives t.buffer not a function error</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/272828#M16206</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:56 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Api-v2-for-filesGetThumbnail-gives-t-buffer-not-a-function-error/m-p/272828#M16206</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2018-04-17T15:47:56Z</dc:date>
    </item>
  </channel>
</rss>

