Curious about A, B, C, and D drives? Learn what they mean and how to use them effectively with Dropbox in this handy guide! - check it out now!
Forum Discussion
NAPOLEON039
8 years agoNew member | Level 2
Api v2 for filesGetThumbnail gives t.buffer not a function error
This is a question that has already been answered, but none of the solutions have worked for me.
I am trying to upload an image using Python and view it using JavaScript. I'm using the Vue.js framework. The upload part happens splendidly with Python. It's the JavaScript part that is giving me some serious headache.
The solutions to previous similar posts have not worked for me. I'm using the following code for fetching a thumbnail; the response doesn't log and instead shows this cryptic error:
Here is my code:
dbox.filesGetThumbnail({path: 'relevant file path with .jpg extension'}) .then(response => { console.log(response) })
Would appreciate some help :slight_smile:
Esikhoob wrote:...
The upload will finish with no error, but after downloading, the file is corrupted.
This is a sample of corrupted video file:
Trados_Learning.mp4 (dropbox.com)
please help me to resolve this problem.
Hi Esikhoob,
The file not only has finished without error but is definitely not corrupted! It's another story that you cannot play this file in regular way, because of some upload mistake you have (error that's not reported, cosa Dropbox server cannot know about it). Just as an example see a screenshot of your video posted (on second 3 out of 23:34):
🤔 Is that you or whoever you took a shot of? 😁
Dropbox API (and all links produced) gives and expect raw data, not something else! Something you have ignored!!! How you got your data (movie) passed? 🧐
Esikhoob wrote:...
<form action="https://content.dropboxapi.com/apitul/1/eE8ccUfewDC6NQ" method="post" enctype="multipart/form-data"> <input name="fileDropbox" type="file" class="form-control input-lg" readonly="true" onclick="return false;"> </form>
...
That's it. You still receive the same video, but "packed" in multipart form data. And since that's what you have forwarded, exactly the same you receive. Of course, most video players cannot distinguish packed video in such a way. Again, the keyword is raw data!!! Don't ignore it anymore and all will work. 😉
Hope this helps.
3 Replies
Sort By
- Greg-DB
Dropbox Staff
It sounds like you're referring to the following threads:
https://github.com/dropbox/dropbox-sdk-js/issues/172
https://www.dropboxforum.com/t5/API-support/Thumbnails/m-p/263451
Did you try including the library as a JavaScript library instead of a Node dependency? Can you elaborate on how exactly the fixes failed for you?- NAPOLEON039New member | Level 2
Oh, looks like I missed that. It works now:grinning:. Thanks!!
- Greg-DB
Dropbox Staff
The original `t.buffer is not a function` issue should be fixed in the latest version of the library, currently v4.0.3.
About View, download, and export
Need support with viewing, downloading, and exporting files and folders from your Dropbox account? Find help from the Dropbox Community.2,817 PostsLatest Activity: 2 hours ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!