New additional information about photo and video files

// By Leah Culver • Apr 10, 2014

Yesterday we launched Carousel, a beautiful gallery for all your photos and videos. Today we're happy to announce that we've updated our API to better support photos and videos.

Specifically, we've added more metadata about media files. You can now use the include_media_info parameter to fetch additional information about photos and videos in the /metadata endpoint.

Here's an example:

http://api.dropbox.com/1/metadata/auto/?include_media_info=true

{
  path: "/",
  contents: [
    {
      path: "/flower.jpg",
      photo_info: {
        time_taken: "Wed, 28 Aug 2013 18:12:02 +0000",
        lat_long: [
          37.77256666666666,
          -122.45934166666667
        ]
      },
      ...
    },
    {
      path: "/beach.mov",
      video_info: {
        duration: 4463,
        time_taken: "Fri, 13 Dec 2013 17:54:38 +0000",
        lat_long: [
          37.770338,
          -122.513565
        ]
      },
      ...
    }
  ]
  ...
}

Currently you can get the following data for each media file:

  • Photo: time taken, GPS coordinates

  • Video: time taken, GPS coordinates, video duration

The time_taken and lat_long values are generated from the Exif data associated with the media file and we've nicely formatted this data to make it more useful to developers. Apps can now display when a photo or video was taken rather than just when it was uploaded to Dropbox. This also allows for sorting a user's media by creation date.

GPS coordinates are interesting for showing where a photo or video was taken, possibly on a map view. Apps could also group photos and videos based on location.

If you're using the /delta endpoint to stay up to date with changes to the user's Dropbox, you can also use the include_media_info parameter to get this additional information. A cool use of media info in the /delta endpoint would be to find out in real-time when a photo or video is taken within a certain geo-fence.

A big thanks to our developer community for suggesting these features. We're working on adding more useful information about media files so let us know what you think on our developer forum and stay tuned for updates!


// Copy Link