We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
SauravAnand
8 years agoExplorer | Level 4
UploadAsync - File got corrupt after uplaod - C#
Hi,
I'm trying to upload photos to Dropbox account using v2.
FileStream fsBlobData = new FileStream(filePath, FileMode.Open, FileAccess.Read);
byte[] bytBlobdata = new byte[fsBlobData.Len...
- 8 years agoYou appear to setting bytBlobdata to an empty array (with a size of the length of the file) and then uploading that, so the resulting file will just be zeros.
You need to supply the actual file data instead. For example, you can just pass in fsBlobData as the body to UploadAsync instead of bytBlobdata.
Greg-DB
8 years agoDropbox Staff
You appear to setting bytBlobdata to an empty array (with a size of the length of the file) and then uploading that, so the resulting file will just be zeros.
You need to supply the actual file data instead. For example, you can just pass in fsBlobData as the body to UploadAsync instead of bytBlobdata.
You need to supply the actual file data instead. For example, you can just pass in fsBlobData as the body to UploadAsync instead of bytBlobdata.
- SauravAnand8 years agoExplorer | Level 4Hi Greg,
Thank you. Your solution worked, i have passed fsBlobData as body to UploadAsync and file got uploaded correctly.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,876 PostsLatest Activity: 6 hours agoIf 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!