You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
kaistullich
7 years agoNew member | Level 2
Upload PDF files/proper encoding
I have a simple Python Flask application that allows users to upload PDF files to a Dropbox account. I am able to successfully upload the file to Dropbox, as well as go directly go to dropbox.com and...
Greg-DB
7 years agoDropbox Staff
[Cross-linking for reference: https://stackoverflow.com/questions/48970161/pdf-encoding-to-upload-to-dropbox-api ]
Using `open`, `read`, and `files_upload` is the right way to upload files like this. The Dropbox API will just accept whatever data you send it.
I just tried this and it's working properly for me. I can upload a local PDF file and the resulting uploaded file is viewable on the web site. Can you check that you're storing and retrieving the correct data at each step leading up to that `files_upload` call in your code (e.g., in your `save` method, etc.)?
- kaistullich7 years agoNew member | Level 2
Hi Greg,
Thank you for your reply. I have just realized that the issue is not with my code, but rather with the PDF file itself. The PDF file that I was trying to upload has "interactive fields" a user has to fill out in Adobe Reader. For some reason Dropbox does not like that, this is something I will have to look into.
Other PDF files that do not have interactive fields work just fine with uploading and I can view them on Dropbox files.
- Psome6 years agoNew member | Level 2Any update on this situation. I am having a similar problem. Unfortunately, in my senecio i can not controll the source of the PDF. Is there a way to not get a corroupted off out of the api the the same file is fine out of the web UI?
- Greg-DB6 years agoDropbox Staff
Psome When downloading a file from the Dropbox API, it will just return whatever raw data was uploaded.
Since in your case the file is displaying in the Dropbox web UI, it sounds like the issue you're seeing may be slightly different than the original issue in this thread. I'll follow up with you privately to see if we can help troubleshoot this.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,880 PostsLatest Activity: 9 minutes 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!