Learn how to make the most out of the Dropbox Community here 💙!
Forum Discussion
PHDev
7 years agoExplorer | Level 3
Upload Image Base64 Encoded with Dropbox API
Hi, I'm trying to use dropbox API for uploads images, actually I have the Base64 encoded string of image file and I wanna use the API for upload. I try this but it doesn't work. curl -X POST https...
chirstius
Dropbox Staff
7 years agoHello PHDev,
Can you clarify if you are trying to store the literal Base64 encoding or if your end goal is to upload Base64 and have Dropbox store the resulting image that the Base64 data represents?
Base64 conversion is not supported by the upload API endpoints. So if you are trying to store the resulting images, you will need to "reconstitute" the image file back to its binary format before you upload it.
If instead, you are trying to store the literal Base64 encoding of the image, you will still need to convert that data to bytes before uploading it and then decode it when you pull it back down.
Hope that helps,
-Chuck
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,973 PostsLatest Activity: 9 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!