<?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 DBFile Mime Type? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81437#M2407</link>
    <description>&lt;P&gt;Is there any way to get the mime-type of a DBFile? Ideally, it'd be nice to query from the DBFileInfo so I can know before I download it. But if that's not possible, can I get it from a file I've downloaded? &lt;EM&gt;I'm using the iOS Sync API&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 May 2019 09:45:25 GMT</pubDate>
    <dc:creator>Stuart T.</dc:creator>
    <dc:date>2019-05-29T09:45:25Z</dc:date>
    <item>
      <title>DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81437#M2407</link>
      <description>&lt;P&gt;Is there any way to get the mime-type of a DBFile? Ideally, it'd be nice to query from the DBFileInfo so I can know before I download it. But if that's not possible, can I get it from a file I've downloaded? &lt;EM&gt;I'm using the iOS Sync API&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2019 09:45:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81437#M2407</guid>
      <dc:creator>Stuart T.</dc:creator>
      <dc:date>2019-05-29T09:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81438#M2408</link>
      <description>&lt;P&gt;The Sync SDK doesn't currently offer the mime type for &lt;CODE&gt;DBFile&lt;/CODE&gt;, but I'll be sure to pass this along as a feature request.&lt;/P&gt;

&lt;P&gt;One thing you may want to do is maintain a mapping of file extension to type and use that against the returned file extension though. For example, we have a list of groupings here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.dropbox.com/developers/reference/devguide" rel="nofollow noreferrer"&gt;https://www.dropbox.com/developers/reference/devguide&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Feb 2015 05:21:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81438#M2408</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2015-02-08T05:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81439#M2409</link>
      <description>&lt;P&gt;To add a little color here, what Greg suggests is all that Dropbox does anyway. We don't store any sort of MIME type with the file; we just look at the file extension. So there's no advantage to getting this information from Dropbox; just pick your favorite list (e.g. from a web server) and map the extensions yourself.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 01:41:57 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81439#M2409</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-02-10T01:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81440#M2410</link>
      <description>&lt;P&gt;So Dropbox determines the MIME type entirely by file extension? Is that ever a problem, because the file extension doesn't guarantee file type?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 02:29:29 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81440#M2410</guid>
      <dc:creator>Stuart T.</dc:creator>
      <dc:date>2015-02-10T02:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81441#M2411</link>
      <description>&lt;P&gt;Yes, that's what Dropbox does. It's true that file extension doesn't guarantee file type. Can you think of something that &lt;EM&gt;does&lt;/EM&gt; guarantee the file type?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 02:43:41 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81441#M2411</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-02-10T02:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81442#M2412</link>
      <description>&lt;P&gt;I suppose any solution is a lookup so maybe it doesn't guarantee, but previously we were using an iOS library called MagicKit which uses libmagic. However, I was hoping to get rid of it as it is causing some issues and appears to no longer be supported.&lt;BR /&gt;
 &lt;A href="https://github.com/aidansteele/MagicKit" rel="nofollow noreferrer"&gt;https://github.com/aidansteele/MagicKit&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 08:16:00 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81442#M2412</guid>
      <dc:creator>Stuart T.</dc:creator>
      <dc:date>2015-02-10T08:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81443#M2413</link>
      <description>&lt;P&gt;Libmagic guesses based on the file contents. We're unlikely to take that approach... you could do something similar by just downloading the first portion of the file (a hundred bytes?), since most of the file type markers that this kind of library look for are located in the header of the file.&lt;/P&gt;

&lt;P&gt;What's the specific scenario for your app? Are you frequently seeing files with the "wrong" extensions? In any case, Dropbox itself isn't going to be able to help you here. We don't do any sniffing of file content to try to guess the MIME type.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 10:04:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81443#M2413</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-02-10T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81444#M2414</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;

&lt;P&gt;Well, I guess if I decide it's necessary to do any sniffing, I can do that on my own to verify file types, I guess I just assumed there would be occasional issues with relying on extension or if I file is missing an extension. &lt;/P&gt;

&lt;P&gt;But it would great if Dropbox is already doing a mapping a file extension to type that DBFileInfo still provided that information. Sure it could be done in the app but it's just additional logic that I would imagine is common in many apps.&lt;/P&gt;

&lt;P&gt;Thanks for your help Steve!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Feb 2015 11:19:47 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81444#M2414</guid>
      <dc:creator>Stuart T.</dc:creator>
      <dc:date>2015-02-10T11:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: DBFile Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81445#M2415</link>
      <description>&lt;P&gt;Understood. We're tracking this as a feature request.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 10:03:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/DBFile-Mime-Type/m-p/81445#M2415</guid>
      <dc:creator>Steve M.</dc:creator>
      <dc:date>2015-02-11T10:03:36Z</dc:date>
    </item>
  </channel>
</rss>

