<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: get media_info with listFolder in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163090#M5734</link>
    <description>&lt;P&gt;You could&amp;nbsp;do something like this:&lt;/P&gt;
&lt;PRE&gt;client.files.listFolder(path: ", recursive: false, includeMediaInfo: true, includeDeleted: false).response { response, error in&lt;BR /&gt; &lt;BR /&gt; if let result = response {&lt;BR /&gt; &lt;BR /&gt; for entry in result.entries {&lt;BR /&gt; &lt;BR /&gt; print(entry.name)&lt;BR /&gt; &lt;BR /&gt; if let fileEntry = entry as? Files.FileMetadata {&lt;BR /&gt; if ((fileEntry.mediaInfo) != nil) {&lt;BR /&gt; switch fileEntry.mediaInfo! as Files.MediaInfo {&lt;BR /&gt; case .Pending:&lt;BR /&gt; print("Media info is pending...")&lt;BR /&gt; case .Metadata(let mediaMetadata):&lt;BR /&gt; print("dimensions: \(mediaMetadata.dimensions)")&lt;BR /&gt; print("location: \(mediaMetadata.location)")&lt;BR /&gt; print("timeTaken: \(mediaMetadata.timeTaken)")&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; } else if let callError = error {&lt;BR /&gt; print(callError)&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;/PRE&gt;
&lt;P&gt;Apologies for the poor formatting.&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2016 06:12:17 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2016-03-18T06:12:17Z</dc:date>
    <item>
      <title>get media_info with listFolder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163089#M5733</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I I call listInfo with includeMediaInfo parameter. How can I extract the media_info as per the reference document:&lt;/P&gt;
&lt;TABLE class="graybox"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;&lt;CODE&gt;&lt;EM&gt;includeMediaInfo&lt;/EM&gt;&lt;/CODE&gt;&lt;/TD&gt;
&lt;TD&gt;
&lt;DIV&gt;
&lt;P&gt;If true, :field:‘FileMetadata.media_info’ is set for photo and video.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;Code extract:&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;client.&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;files&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;.&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;listFolder&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(path: path, recursive: &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;false&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;, includeMediaInfo: &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;true&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;, includeDeleted: &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;false&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;).&lt;/SPAN&gt;&lt;SPAN class="s3"&gt;response&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; { response, error &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;in&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s4"&gt;if&lt;/SPAN&gt; &lt;SPAN class="s4"&gt;let&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; result = response {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="s4"&gt;for&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; entry &lt;/SPAN&gt;&lt;SPAN class="s4"&gt;in&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; result.&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;entries&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; {&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;....&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:34:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163089#M5733</guid>
      <dc:creator>sigrem</dc:creator>
      <dc:date>2019-05-29T09:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: get media_info with listFolder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163090#M5734</link>
      <description>&lt;P&gt;You could&amp;nbsp;do something like this:&lt;/P&gt;
&lt;PRE&gt;client.files.listFolder(path: ", recursive: false, includeMediaInfo: true, includeDeleted: false).response { response, error in&lt;BR /&gt; &lt;BR /&gt; if let result = response {&lt;BR /&gt; &lt;BR /&gt; for entry in result.entries {&lt;BR /&gt; &lt;BR /&gt; print(entry.name)&lt;BR /&gt; &lt;BR /&gt; if let fileEntry = entry as? Files.FileMetadata {&lt;BR /&gt; if ((fileEntry.mediaInfo) != nil) {&lt;BR /&gt; switch fileEntry.mediaInfo! as Files.MediaInfo {&lt;BR /&gt; case .Pending:&lt;BR /&gt; print("Media info is pending...")&lt;BR /&gt; case .Metadata(let mediaMetadata):&lt;BR /&gt; print("dimensions: \(mediaMetadata.dimensions)")&lt;BR /&gt; print("location: \(mediaMetadata.location)")&lt;BR /&gt; print("timeTaken: \(mediaMetadata.timeTaken)")&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; } else if let callError = error {&lt;BR /&gt; print(callError)&lt;BR /&gt; }&lt;BR /&gt; &lt;BR /&gt; }&lt;/PRE&gt;
&lt;P&gt;Apologies for the poor formatting.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 06:12:17 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163090#M5734</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-03-18T06:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: get media_info with listFolder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163091#M5735</link>
      <description>&lt;P&gt;Thanks Gregory. This works great. Does includeMediaInfo have any negative impact on the performance of listing files?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 23:23:26 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163091#M5735</guid>
      <dc:creator>sigrem</dc:creator>
      <dc:date>2016-03-18T23:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: get media_info with listFolder</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163092#M5736</link>
      <description>&lt;P&gt;I don't believe there should be any performance impact. The media information is prepared separately, and if it isn't ready, you'll just get the .Pending case.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 23:58:20 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/get-media-info-with-listFolder/m-p/163092#M5736</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2016-03-18T23:58:20Z</dc:date>
    </item>
  </channel>
</rss>

