question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropbox.filesDownload returns corrupt data for Word Documents

See original GitHub issue

When I use the filesDownload function to retrieve a Word Document, the file writes successfully, but with missing bytes (rendered in a text editor as ?). I’ve tried to decode the data into the file from binary to utf-8 to hex to base64 With no luck. Binary and UTF-8 encoding seem the closest to the original file bitwise, but I am nonetheless getting corrupt data back.

dbx.filesDownload({path: path})
      .then(function (response) {
         saveFile(null, response.fileBinary));
      })
      .catch(saveFile);

Note: this is on a Node Server.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
t-hgcommented, Feb 25, 2018

Same issue here with PDF

v 2.5.+

%PDF-1.3
%âãÏÓ
[...]

v 3.0.4

%PDF-1.3
%����
[...]
2reactions
kyle-westcommented, Feb 20, 2018

Here is an example line from the file when I open it up in a text editor and compare it to the original:

Original

l"%3÷Þ3VƃÑÚšl	µw%ë=–“^i7+Ù×ä-d&á”0ÞAÉ6€l4¼½L60#µÃ’ÍS

Response from filesDownload

l"%3��3Vƃ�ښl	�w%�=���^i7+���-d&��0�A�6�l4��L60#�Ò�S

As you may see, there are missing values in this line that are not in the original.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Corrupted Word Documents - Dropbox Community
Solved: I am at my wit's end! I didn't realise that DropBox would corrupt files. I now have several Word documents in a...
Read more >
HTTP - Developers - Dropbox.com
The Dropbox API allows developers to work with files in Dropbox, ... request returns any of the following status codes: HTTP 400 Bad...
Read more >
Customers are Getting Corrupted Files | WordPress.org
Hi,. I am using Dropbox direct download links in Woocommerce to deliver downloadable products. However, my customers are receiving corrupted ...
Read more >
Fixed: Dropbox Direct Download Not Working or Failed (7 Ways)
Why can't I download files from Dropbox? ... click Relaunch, restart the browser, and then continue to complete the file download operation.
Read more >
Word, Excell, & PowerPoint files suddenly corrupted, but I can
Word, Excell, & PowerPoint files suddenly corrupted, but I can open them directly from DropBox. What's going on here?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found