Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Vinicius A.2
9 years agoNew member | Level 1
Upload Corrupted
I'm trying upload a file by http. The Upload is OK. Bas de zip file is always corrupted. I've checked the file before upload and i'ts ok. My code: var bytes = File.ReadAllBytes(fileToSend); ...
Vinicius A.2
9 years agoNew member | Level 1
Problem solved with the code below.
WebClient client = new WebClient();
client.BaseAddress = "https://content.dropboxapi.com/2/";
client.Headers.Add("Content-Type", "application/octet-stream");
client.Headers.Add("Authorization", string.Format("Bearer {0}", token.access_token));
var meta = "{\"path\": \"/backups/" + fileName + "\",\"mode\": \"overwrite\",\"autorename\": true,\"mute\": false} ";
client.Headers.Add("Dropbox-API-Arg", meta);
var result = client.UploadData("files/upload", WebRequestMethods
.Http.Post, bytes);
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!