Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi,
I am trying to upload a pdf with valid content from mobile device to Dropbox but having trouble with the uploaded file that seems to get corrupted while being uploaded. It is a React Native (Expo) app.
Please refer to the attachment for the code that I am using.
I have also tried to download the file and open it in Notepad++ and can see its content (see attached).
What's that I am wrong? I have tried to send the content to "filesupload" as binary as well but the uploaded pdf file is still corrupted.
Many thanks in advance.
When uploading files to Dropbox, you should just supply the raw binary data. In the code here, there are two things that look like they may be altering or affecting the format of the data you're sending: 1) 'base64: true' on your printToFileAsync method and 2) readAsStringAsync. Those methods aren't made by Dropbox though so I can't say what exactly they do or offer guidance on those, so I recommend referring to the documentation for those for information on using them accordingly.
Hi there!
If you need more help you can view your support options (expected response time for a 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!