Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
FSUInnovation
6 years agoExplorer | Level 4
Files Uploaded are Corrupted After api usage
I tried uploading various documents of types ms word doc and pdf to the site using the standard fread method in my curl postfields input. The files are corrupted and cannot be repaired by a word proc...
- 6 years ago
I see you're adding a layer of base64 encoding via your call to base64_encode. You should not base64 encode the file data when uploading it. Try removing that base64_encode call.
Greg-DB
Dropbox Community Moderator
6 years agoI see you're adding a layer of base64 encoding via your call to base64_encode. You should not base64 encode the file data when uploading it. Try removing that base64_encode call.
FSUInnovation
6 years agoExplorer | Level 4
It is working now and am able to view the contents on my dropbox viewer. However, when I tried doing it without any encoding yesterday, I also had corruption. What could increase the risk of file corruption when uploading with the api?
- Greg-DB6 years ago
Dropbox Community Moderator
There's no reason an upload without extra encoding like that should result in a corrupted file.
If you can reproduce an issue where correct code and a valid original file results in a corrupted file when uploaded to Dropbox via the API, please share the steps and code to reproduce it so we can look into it.
About Discuss Dropbox Developer & API
Make connections with other developers
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!