cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: How to get description or caption from the info (metadata) of an image using Python API.

How to get description or caption from the info (metadata) of an image using Python API.

Mojtaba433
New member | Level 2

I want to get the "description" or "caption" from the info (metadata) of an image using Python API. I use the 

"files_get_metadata" method but the result doesn't include all the info of the image (only size, name, path, etc).
I would appreciate it if you could help me to get all the info on the image such as "description" or "caption".
 
Regards
3 Replies 3

Greg-DB
Dropbox Staff

It sounds like you're looking for other metadata embedded in image, such as using Exif. While the Dropbox API directly exposes information from some of these fields, as you found, it does not offer the ability to retrieve all of them, such as other fields like "description" and "caption". I'll pass this along as a feature request, but I can't promise if or when that might be implemented though. That being the case, you'd need to download the image data and extract the image metadata in your code to access those fields.

Mojtaba433
New member | Level 2

Thanks for your quick reply.

I tried to download the images and extract the metadata but unfortunately, not all metadata is available after downloading. Do you suggest any specific method of downloading that keeps all metadata including caption and description?

Greg-DB
Dropbox Staff

When you using the files_download (or files_download_to_file) functionality, Dropbox will return the exact data that it has for the file. Dropbox does not modify the data that it receives when a file is uploaded, so if the embedded metadata is not present in the returned data, it means that it was not present when the file was uploaded.

 

That being the case, make sure the embedded metadata is included in the file when you originally upload it. Otherwise, you may need to debug the process by which you extract the embedded metadata. That process, e.g., of reading Exif data from an image file, is outside the scope of Dropbox support though, so I'm afraid I can't offer specific guidance on that. You should refer to the resources for whatever code you're using to extract the embedded metadata, if you're using a third party library to do so, for instance.

Need more support?