Files get corrupted when uploading
See original GitHub issueFiles get corrupted when I upload a doc, docx or pdf file:
dbx.filesUpload({ path: path, contents: fs.readFileSync(filepath) })
.then(function (response) {
console.log(response);
})
.catch(function (err) {
console.log("Error:");
console.log(err);
});
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
What Does It Mean When Your File Is Corrupt?
A corrupted file is essentially a file that has become damaged and refuses to open properly.
Read more >Excel document get corrupted when uploaded to Sharepoint
According to your description, you want to prevent the Excel files from getting corrupted when uploaded to SharePoint Online.
Read more >Files are corrupted sometimes when uploaded with multipart ...
Sometimes (maybe one time in 20) multipart uploads of a 128MiB file get corrupted. I know they are corrupted because the SHA1 that...
Read more >What Is A Corrupted File And How To Fix It? - Techslang
Files may get corrupted when they are saved or created. Some of the reasons include sudden office app glitches or compression app issues....
Read more >All files got corrupted that i tried to upload on drive. How to ...
How to recover them?? I tried uploading 134 photos. None of them got uploaded and when i checked them again on my phone,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ThomasBormans, drop the
'utf8'
from your call tofs.readFile
. Zip files are not UTF-8 encoded.I have the same problem. I have a zip file and the following code:
When the file is uploaded, it automatically downloads on my computer (through the Dropbox app for Mac) in my root folder of Dropbox. When I try to unzip the uploaded file, I get the following message: `Unable to expand “test.zip” into “Dropbox”. (Error 21 - Is a directory.).
This is the output from the Dropbox sdk:
I also noticed that the uploaded zip has doubled in size compared to the original zip. The original zip is 3.259 bytes (4 KB), the uploaded zip is 5.505 bytes (8 KB).
If it helps, I am running node 4.5.0.