We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
paul48
3 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.
1 Reply
- Greg-DB3 years ago
Dropbox Community Moderator
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.
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!