One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
paul48
2 years agoNew member | Level 2
Improper content upload when using dropbox upload_file API
When I use the file_upload api to upload a file by first opening it with:
with open(temp_file_path, 'rb') as local_file:
file_data_local = local_file.read()
The file uploads to the correct place in dropbox.
However, when I get my file from a post request and try to read it and pass it into file upload the contents of the file are incorrect. Something is getting created but when I click on the file the following message is displayed: .xlsx files are supported but something went wrong.
I tried to download the file created and open it but it will not open as the format/content is unrecognizable.
- Greg-DB
Dropbox Staff
I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:
- the name and version number of the platform and SDK/library you are using, if any
- the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
- the full text of the result from the Dropbox API
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,949 PostsLatest Activity: 4 hours ago
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 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!