Source Edit

This module implements a mimetypes database

Example:

  1. import std/mimetypes
  2. var m = newMimetypes()
  3. doAssert m.getMimetype("mp4") == "video/mp4"
  4. doAssert m.getExt("text/html") == "html"
  5. ## Values can be uppercase too.
  6. doAssert m.getMimetype("MP4") == "video/mp4"
  7. doAssert m.getExt("TEXT/HTML") == "html"
  8. ## If values are invalid then `default` is returned.
  9. doAssert m.getMimetype("INVALID") == "text/plain"
  10. doAssert m.getExt("INVALID/NONEXISTENT") == "txt"
  11. doAssert m.getMimetype("") == "text/plain"
  12. doAssert m.getExt("") == "txt"
  13. ## Register new Mimetypes.
  14. m.register(ext = "fakext", mimetype = "text/fakelang")
  15. doAssert m.getMimetype("fakext") == "text/fakelang"
  16. doAssert m.getMimetype("FaKeXT") == "text/fakelang"

Imports

tables, strutils

Types

  1. MimeDB = object

Source Edit

Consts

  1. mimes = [("ez", "application/andrew-inset"), ("aw", "application/applixware"),
  2. ("atom", "application/atom+xml"),
  3. ("atomcat", "application/atomcat+xml"),
  4. ("atomsvc", "application/atomsvc+xml"),
  5. ("ccxml", "application/ccxml+xml"),
  6. ("cdmia", "application/cdmi-capability"),
  7. ("cdmic", "application/cdmi-container"),
  8. ("cdmid", "application/cdmi-domain"),
  9. ("cdmio", "application/cdmi-object"),
  10. ("cdmiq", "application/cdmi-queue"), ("cu", "application/cu-seeme"),
  11. ("davmount", "application/davmount+xml"),
  12. ("dbk", "application/docbook+xml"), ("dssc", "application/dssc+der"),
  13. ("xdssc", "application/dssc+xml"), ("ecma", "application/ecmascript"),
  14. ("emma", "application/emma+xml"), ("epub", "application/epub+zip"),
  15. ("exi", "application/exi"), ("pfr", "application/font-tdpfr"),
  16. ("gml", "application/gml+xml"), ("gpx", "application/gpx+xml"),
  17. ("gxf", "application/gxf"), ("stk", "application/hyperstudio"),
  18. ("ink", "application/inkml+xml"), ("inkml", "application/inkml+xml"),
  19. ("ipfix", "application/ipfix"), ("jar", "application/java-archive"),
  20. ("ser", "application/java-serialized-object"),
  21. ("class", "application/java-vm"), ("json", "application/json"),
  22. ("jsonml", "application/jsonml+json"),
  23. ("lostxml", "application/lost+xml"),
  24. ("hqx", "application/mac-binhex40"),
  25. ("cpt", "application/mac-compactpro"),
  26. ("mads", "application/mads+xml"), ("mrc", "application/marc"),
  27. ("mrcx", "application/marcxml+xml"),
  28. ("ma", "application/mathematica"), ("nb", "application/mathematica"),
  29. ("mb", "application/mathematica"),
  30. ("mathml", "application/mathml+xml"), ("mbox", "application/mbox"),
  31. ("mscml", "application/mediaservercontrol+xml"),
  32. ("metalink", "application/metalink+xml"),
  33. ("meta4", "application/metalink4+xml"),
  34. ("mets", "application/mets+xml"), ("mods", "application/mods+xml"),
  35. ("m21", "application/mp21"), ("mp21", "application/mp21"),
  36. ("mp4s", "application/mp4"), ("doc", "application/msword"),
  37. ("dot", "application/msword"), ("mxf", "application/mxf"),
  38. ("bin", "application/octet-stream"),
  39. ("dms", "application/octet-stream"),
  40. ("lrf", "application/octet-stream"),
  41. ("mar", "application/octet-stream"),
  42. ("so", "application/octet-stream"),
  43. ("dist", "application/octet-stream"),
  44. ("distz", "application/octet-stream"),
  45. ("pkg", "application/octet-stream"),
  46. ("bpk", "application/octet-stream"),
  47. ("dump", "application/octet-stream"),
  48. ("elc", "application/octet-stream"),
  49. ("deploy", "application/octet-stream"), ("oda", "application/oda"),
  50. ("opf", "application/oebps-package+xml"), ("ogx", "application/ogg"),
  51. ("omdoc", "application/omdoc+xml"), ("onetoc", "application/onenote"),
  52. ("onetoc2", "application/onenote"), ("onetmp", "application/onenote"),
  53. ("onepkg", "application/onenote"), ("oxps", "application/oxps"),
  54. ("xer", "application/patch-ops-error+xml"),
  55. ("pdf", "application/pdf"), ("pgp", "application/pgp-encrypted"),
  56. ("asc", "application/pgp-signature"),
  57. ("sig", "application/pgp-signature"),
  58. ("prf", "application/pics-rules"), ("p10", "application/pkcs10"),
  59. ("p7m", "application/pkcs7-mime"), ("p7c", "application/pkcs7-mime"),
  60. ("p7s", "application/pkcs7-signature"), ("p8", "application/pkcs8"),
  61. ("ac", "application/pkix-attr-cert"),
  62. ("cer", "application/pkix-cert"), ("crl", "application/pkix-crl"),
  63. ("pkipath", "application/pkix-pkipath"),
  64. ("pki", "application/pkixcmp"), ("pls", "application/pls+xml"),
  65. ("ai", "application/postscript"), ("eps", "application/postscript"),
  66. ("ps", "application/postscript"), ("cww", "application/prs.cww"),
  67. ("pskcxml", "application/pskc+xml"), ("rdf", "application/rdf+xml"),
  68. ("rif", "application/reginfo+xml"),
  69. ("rnc", "application/relax-ng-compact-syntax"),
  70. ("rl", "application/resource-lists+xml"),
  71. ("rld", "application/resource-lists-diff+xml"),
  72. ("rs", "application/rls-services+xml"),
  73. ("gbr", "application/rpki-ghostbusters"),
  74. ("mft", "application/rpki-manifest"), ("roa", "application/rpki-roa"),
  75. ("rsd", "application/rsd+xml"), ("rss", "application/rss+xml"),
  76. ("rtf", "application/rtf"), ("sbml", "application/sbml+xml"),
  77. ("scq", "application/scvp-cv-request"),
  78. ("scs", "application/scvp-cv-response"),
  79. ("spq", "application/scvp-vp-request"),
  80. ("spp", "application/scvp-vp-response"), ("sdp", "application/sdp"),
  81. ("setpay", "application/set-payment-initiation"),
  82. ("setreg", "application/set-registration-initiation"),
  83. ("shf", "application/shf+xml"), ("smi", "application/smil+xml"),
  84. ("smil", "application/smil+xml"), ("rq", "application/sparql-query"),
  85. ("srx", "application/sparql-results+xml"),
  86. ("gram", "application/srgs"), ("grxml", "application/srgs+xml"),
  87. ("sru", "application/sru+xml"), ("ssdl", "application/ssdl+xml"),
  88. ("ssml", "application/ssml+xml"), ("tei", "application/tei+xml"),
  89. ("teicorpus", "application/tei+xml"),
  90. ("tfi", "application/thraud+xml"),
  91. ("tsd", "application/timestamped-data"),
  92. ("plb", "application/vnd.3gpp.pic-bw-large"),
  93. ("psb", "application/vnd.3gpp.pic-bw-small"),
  94. ("pvb", "application/vnd.3gpp.pic-bw-var"),
  95. ("tcap", "application/vnd.3gpp2.tcap"),
  96. ("pwn", "application/vnd.3m.post-it-notes"),
  97. ("aso", "application/vnd.accpac.simply.aso"),
  98. ("imp", "application/vnd.accpac.simply.imp"),
  99. ("acu", "application/vnd.acucobol"),
  100. ("atc", "application/vnd.acucorp"),
  101. ("acutc", "application/vnd.acucorp"), ("air",
  102. "application/vnd.adobe.air-application-installer-package+zip"),
  103. ("fcdt", "application/vnd.adobe.formscentral.fcdt"),
  104. ("fxp", "application/vnd.adobe.fxp"),
  105. ("fxpl", "application/vnd.adobe.fxp"),
  106. ("xdp", "application/vnd.adobe.xdp+xml"),
  107. ("xfdf", "application/vnd.adobe.xfdf"),
  108. ("ahead", "application/vnd.ahead.space"),
  109. ("azf", "application/vnd.airzip.filesecure.azf"),
  110. ("azs", "application/vnd.airzip.filesecure.azs"),
  111. ("azw", "application/vnd.amazon.ebook"),
  112. ("acc", "application/vnd.americandynamics.acc"),
  113. ("ami", "application/vnd.amiga.ami"),
  114. ("apk", "application/vnd.android.package-archive"),
  115. ("cii", "application/vnd.anser-web-certificate-issue-initiation"),
  116. ("fti", "application/vnd.anser-web-funds-transfer-initiation"),
  117. ("atx", "application/vnd.antix.game-component"),
  118. ("mpkg", "application/vnd.apple.installer+xml"),
  119. ("m3u8", "application/vnd.apple.mpegurl"),
  120. ("swi", "application/vnd.aristanetworks.swi"),
  121. ("iota", "application/vnd.astraea-software.iota"),
  122. ("aep", "application/vnd.audiograph"),
  123. ("mpm", "application/vnd.blueice.multipass"),
  124. ("bmi", "application/vnd.bmi"),
  125. ("rep", "application/vnd.businessobjects"),
  126. ("cdxml", "application/vnd.chemdraw+xml"),
  127. ("mmd", "application/vnd.chipnuts.karaoke-mmd"),
  128. ("cdy", "application/vnd.cinderella"),
  129. ("cla", "application/vnd.claymore"),
  130. ("rp9", "application/vnd.cloanto.rp9"),
  131. ("c4g", "application/vnd.clonk.c4group"),
  132. ("c4d", "application/vnd.clonk.c4group"),
  133. ("c4f", "application/vnd.clonk.c4group"),
  134. ("c4p", "application/vnd.clonk.c4group"),
  135. ("c4u", "application/vnd.clonk.c4group"),
  136. ("c11amc", "application/vnd.cluetrust.cartomobile-config"),
  137. ("c11amz", "application/vnd.cluetrust.cartomobile-config-pkg"),
  138. ("csp", "application/vnd.commonspace"),
  139. ("cdbcmsg", "application/vnd.contact.cmsg"),
  140. ("cmc", "application/vnd.cosmocaller"),
  141. ("clkx", "application/vnd.crick.clicker"),
  142. ("clkk", "application/vnd.crick.clicker.keyboard"),
  143. ("clkp", "application/vnd.crick.clicker.palette"),
  144. ("clkt", "application/vnd.crick.clicker.template"),
  145. ("clkw", "application/vnd.crick.clicker.wordbank"),
  146. ("wbs", "application/vnd.criticaltools.wbs+xml"),
  147. ("pml", "application/vnd.ctc-posml"),
  148. ("ppd", "application/vnd.cups-ppd"),
  149. ("car", "application/vnd.curl.car"),
  150. ("pcurl", "application/vnd.curl.pcurl"),
  151. ("dart", "application/vnd.dart"),
  152. ("rdz", "application/vnd.data-vision.rdz"),
  153. ("uvf", "application/vnd.dece.data"),
  154. ("uvvf", "application/vnd.dece.data"),
  155. ("uvd", "application/vnd.dece.data"),
  156. ("uvvd", "application/vnd.dece.data"),
  157. ("uvt", "application/vnd.dece.ttml+xml"),
  158. ("uvvt", "application/vnd.dece.ttml+xml"),
  159. ("uvx", "application/vnd.dece.unspecified"),
  160. ("uvvx", "application/vnd.dece.unspecified"),
  161. ("uvz", "application/vnd.dece.zip"),
  162. ("uvvz", "application/vnd.dece.zip"),
  163. ("fe_launch", "application/vnd.denovo.fcselayout-link"),
  164. ("dna", "application/vnd.dna"), ("mlp", "application/vnd.dolby.mlp"),
  165. ("dpg", "application/vnd.dpgraph"),
  166. ("dfac", "application/vnd.dreamfactory"),
  167. ("kpxx", "application/vnd.ds-keypoint"),
  168. ("ait", "application/vnd.dvb.ait"),
  169. ("svc", "application/vnd.dvb.service"),
  170. ("geo", "application/vnd.dynageo"),
  171. ("mag", "application/vnd.ecowin.chart"),
  172. ("nml", "application/vnd.enliven"),
  173. ("esf", "application/vnd.epson.esf"),
  174. ("msf", "application/vnd.epson.msf"),
  175. ("qam", "application/vnd.epson.quickanime"),
  176. ("slt", "application/vnd.epson.salt"),
  177. ("ssf", "application/vnd.epson.ssf"),
  178. ("es3", "application/vnd.eszigno3+xml"),
  179. ("et3", "application/vnd.eszigno3+xml"),
  180. ("ez2", "application/vnd.ezpix-album"),
  181. ("ez3", "application/vnd.ezpix-package"),
  182. ("fdf", "application/vnd.fdf"),
  183. ("mseed", "application/vnd.fdsn.mseed"),
  184. ("seed", "application/vnd.fdsn.seed"),
  185. ("dataless", "application/vnd.fdsn.seed"),
  186. ("gph", "application/vnd.flographit"),
  187. ("ftc", "application/vnd.fluxtime.clip"),
  188. ("fm", "application/vnd.framemaker"),
  189. ("frame", "application/vnd.framemaker"),
  190. ("maker", "application/vnd.framemaker"),
  191. ("book", "application/vnd.framemaker"),
  192. ("fnc", "application/vnd.frogans.fnc"),
  193. ("ltf", "application/vnd.frogans.ltf"),
  194. ("fsc", "application/vnd.fsc.weblaunch"),
  195. ("oas", "application/vnd.fujitsu.oasys"),
  196. ("oa2", "application/vnd.fujitsu.oasys2"),
  197. ("oa3", "application/vnd.fujitsu.oasys3"),
  198. ("fg5", "application/vnd.fujitsu.oasysgp"),
  199. ("bh2", "application/vnd.fujitsu.oasysprs"),
  200. ("ddd", "application/vnd.fujixerox.ddd"),
  201. ("xdw", "application/vnd.fujixerox.docuworks"),
  202. ("xbd", "application/vnd.fujixerox.docuworks.binder"),
  203. ("fzs", "application/vnd.fuzzysheet"),
  204. ("txd", "application/vnd.genomatix.tuxedo"),
  205. ("ggb", "application/vnd.geogebra.file"),
  206. ("ggs", "application/vnd.geogebra.slides"),
  207. ("ggt", "application/vnd.geogebra.tool"),
  208. ("gex", "application/vnd.geometry-explorer"),
  209. ("gre", "application/vnd.geometry-explorer"),
  210. ("gxt", "application/vnd.geonext"),
  211. ("g2w", "application/vnd.geoplan"),
  212. ("g3w", "application/vnd.geospace"), ("gmx", "application/vnd.gmx"),
  213. ("kml", "application/vnd.google-earth.kml+xml"),
  214. ("kmz", "application/vnd.google-earth.kmz"),
  215. ("gqf", "application/vnd.grafeq"), ("gqs", "application/vnd.grafeq"),
  216. ("gac", "application/vnd.groove-account"),
  217. ("ghf", "application/vnd.groove-help"),
  218. ("gim", "application/vnd.groove-identity-message"),
  219. ("grv", "application/vnd.groove-injector"),
  220. ("gtm", "application/vnd.groove-tool-message"),
  221. ("tpl", "application/vnd.groove-tool-template"),
  222. ("vcg", "application/vnd.groove-vcard"),
  223. ("hal", "application/vnd.hal+xml"),
  224. ("zmm", "application/vnd.handheld-entertainment+xml"),
  225. ("hbci", "application/vnd.hbci"),
  226. ("les", "application/vnd.hhe.lesson-player"),
  227. ("hpgl", "application/vnd.hp-hpgl"),
  228. ("hpid", "application/vnd.hp-hpid"),
  229. ("hps", "application/vnd.hp-hps"), ("jlt", "application/vnd.hp-jlyt"),
  230. ("pcl", "application/vnd.hp-pcl"),
  231. ("pclxl", "application/vnd.hp-pclxl"),
  232. ("sfd-hdstx", "application/vnd.hydrostatix.sof-data"),
  233. ("mpy", "application/vnd.ibm.minipay"),
  234. ("afp", "application/vnd.ibm.modcap"),
  235. ("listafp", "application/vnd.ibm.modcap"),
  236. ("list3820", "application/vnd.ibm.modcap"),
  237. ("irm", "application/vnd.ibm.rights-management"),
  238. ("sc", "application/vnd.ibm.secure-container"),
  239. ("icc", "application/vnd.iccprofile"),
  240. ("icm", "application/vnd.iccprofile"),
  241. ("igl", "application/vnd.igloader"),
  242. ("ivp", "application/vnd.immervision-ivp"),
  243. ("ivu", "application/vnd.immervision-ivu"),
  244. ("igm", "application/vnd.insors.igm"),
  245. ("xpw", "application/vnd.intercon.formnet"),
  246. ("xpx", "application/vnd.intercon.formnet"),
  247. ("i2g", "application/vnd.intergeo"),
  248. ("qbo", "application/vnd.intu.qbo"),
  249. ("qfx", "application/vnd.intu.qfx"),
  250. ("rcprofile", "application/vnd.ipunplugged.rcprofile"),
  251. ("irp", "application/vnd.irepository.package+xml"),
  252. ("xpr", "application/vnd.is-xpr"),
  253. ("fcs", "application/vnd.isac.fcs"), ("jam", "application/vnd.jam"),
  254. ("rms", "application/vnd.jcp.javame.midlet-rms"),
  255. ("jisp", "application/vnd.jisp"),
  256. ("joda", "application/vnd.joost.joda-archive"),
  257. ("ktz", "application/vnd.kahootz"),
  258. ("ktr", "application/vnd.kahootz"),
  259. ("karbon", "application/vnd.kde.karbon"),
  260. ("chrt", "application/vnd.kde.kchart"),
  261. ("kfo", "application/vnd.kde.kformula"),
  262. ("flw", "application/vnd.kde.kivio"),
  263. ("kon", "application/vnd.kde.kontour"),
  264. ("kpr", "application/vnd.kde.kpresenter"),
  265. ("kpt", "application/vnd.kde.kpresenter"),
  266. ("ksp", "application/vnd.kde.kspread"),
  267. ("kwd", "application/vnd.kde.kword"),
  268. ("kwt", "application/vnd.kde.kword"),
  269. ("htke", "application/vnd.kenameaapp"),
  270. ("kia", "application/vnd.kidspiration"),
  271. ("kne", "application/vnd.kinar"), ("knp", "application/vnd.kinar"),
  272. ("skp", "application/vnd.koan"), ("skd", "application/vnd.koan"),
  273. ("skt", "application/vnd.koan"), ("skm", "application/vnd.koan"),
  274. ("sse", "application/vnd.kodak-descriptor"),
  275. ("lasxml", "application/vnd.las.las+xml"),
  276. ("lbd", "application/vnd.llamagraphics.life-balance.desktop"),
  277. ("lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"),
  278. ("123", "application/vnd.lotus-1-2-3"),
  279. ("apr", "application/vnd.lotus-approach"),
  280. ("pre", "application/vnd.lotus-freelance"),
  281. ("nsf", "application/vnd.lotus-notes"),
  282. ("org", "application/vnd.lotus-organizer"),
  283. ("scm", "application/vnd.lotus-screencam"),
  284. ("lwp", "application/vnd.lotus-wordpro"),
  285. ("portpkg", "application/vnd.macports.portpkg"),
  286. ("mcd", "application/vnd.mcd"),
  287. ("mc1", "application/vnd.medcalcdata"),
  288. ("cdkey", "application/vnd.mediastation.cdkey"),
  289. ("mwf", "application/vnd.mfer"), ("mfm", "application/vnd.mfmp"),
  290. ("flo", "application/vnd.micrografx.flo"),
  291. ("igx", "application/vnd.micrografx.igx"),
  292. ("mif", "application/vnd.mif"), ("daf", "application/vnd.mobius.daf"),
  293. ("dis", "application/vnd.mobius.dis"),
  294. ("mbk", "application/vnd.mobius.mbk"),
  295. ("mqy", "application/vnd.mobius.mqy"),
  296. ("msl", "application/vnd.mobius.msl"),
  297. ("plc", "application/vnd.mobius.plc"),
  298. ("txf", "application/vnd.mobius.txf"),
  299. ("mpn", "application/vnd.mophun.application"),
  300. ("mpc", "application/vnd.mophun.certificate"),
  301. ("xul", "application/vnd.mozilla.xul+xml"),
  302. ("cil", "application/vnd.ms-artgalry"),
  303. ("cab", "application/vnd.ms-cab-compressed"),
  304. ("xls", "application/vnd.ms-excel"),
  305. ("xlm", "application/vnd.ms-excel"),
  306. ("xla", "application/vnd.ms-excel"),
  307. ("xlc", "application/vnd.ms-excel"),
  308. ("xlt", "application/vnd.ms-excel"),
  309. ("xlw", "application/vnd.ms-excel"),
  310. ("xlam", "application/vnd.ms-excel.addin.macroenabled.12"),
  311. ("xlsb", "application/vnd.ms-excel.sheet.binary.macroenabled.12"),
  312. ("xlsm", "application/vnd.ms-excel.sheet.macroenabled.12"),
  313. ("xltm", "application/vnd.ms-excel.template.macroenabled.12"),
  314. ("eot", "application/vnd.ms-fontobject"),
  315. ("chm", "application/vnd.ms-htmlhelp"),
  316. ("ims", "application/vnd.ms-ims"), ("lrm", "application/vnd.ms-lrm"),
  317. ("thmx", "application/vnd.ms-officetheme"),
  318. ("cat", "application/vnd.ms-pki.seccat"),
  319. ("stl", "application/vnd.ms-pki.stl"),
  320. ("ppt", "application/vnd.ms-powerpoint"),
  321. ("pps", "application/vnd.ms-powerpoint"),
  322. ("pot", "application/vnd.ms-powerpoint"),
  323. ("ppam", "application/vnd.ms-powerpoint.addin.macroenabled.12"), (
  324. "pptm", "application/vnd.ms-powerpoint.presentation.macroenabled.12"),
  325. ("sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"),
  326. ("ppsm", "application/vnd.ms-powerpoint.slideshow.macroenabled.12"),
  327. ("potm", "application/vnd.ms-powerpoint.template.macroenabled.12"),
  328. ("mpp", "application/vnd.ms-project"),
  329. ("mpt", "application/vnd.ms-project"),
  330. ("docm", "application/vnd.ms-word.document.macroenabled.12"),
  331. ("dotm", "application/vnd.ms-word.template.macroenabled.12"),
  332. ("wps", "application/vnd.ms-works"),
  333. ("wks", "application/vnd.ms-works"),
  334. ("wcm", "application/vnd.ms-works"),
  335. ("wdb", "application/vnd.ms-works"),
  336. ("wpl", "application/vnd.ms-wpl"),
  337. ("xps", "application/vnd.ms-xpsdocument"),
  338. ("mseq", "application/vnd.mseq"), ("mus", "application/vnd.musician"),
  339. ("msty", "application/vnd.muvee.style"),
  340. ("taglet", "application/vnd.mynfc"),
  341. ("nlu", "application/vnd.neurolanguage.nlu"), ("nim", "text/nim"),
  342. ("nimble", "text/nimble"), ("nimf", "text/nim"), ("nims", "text/nim"),
  343. ("ntf", "application/vnd.nitf"), ("nitf", "application/vnd.nitf"),
  344. ("nnd", "application/vnd.noblenet-directory"),
  345. ("nns", "application/vnd.noblenet-sealer"),
  346. ("nnw", "application/vnd.noblenet-web"),
  347. ("ngdat", "application/vnd.nokia.n-gage.data"),
  348. ("n-gage", "application/vnd.nokia.n-gage.symbian.install"),
  349. ("rpst", "application/vnd.nokia.radio-preset"),
  350. ("rpss", "application/vnd.nokia.radio-presets"),
  351. ("edm", "application/vnd.novadigm.edm"),
  352. ("edx", "application/vnd.novadigm.edx"),
  353. ("ext", "application/vnd.novadigm.ext"),
  354. ("odc", "application/vnd.oasis.opendocument.chart"),
  355. ("otc", "application/vnd.oasis.opendocument.chart-template"),
  356. ("odb", "application/vnd.oasis.opendocument.database"),
  357. ("odf", "application/vnd.oasis.opendocument.formula"),
  358. ("odft", "application/vnd.oasis.opendocument.formula-template"),
  359. ("odg", "application/vnd.oasis.opendocument.graphics"),
  360. ("otg", "application/vnd.oasis.opendocument.graphics-template"),
  361. ("odi", "application/vnd.oasis.opendocument.image"),
  362. ("oti", "application/vnd.oasis.opendocument.image-template"),
  363. ("odp", "application/vnd.oasis.opendocument.presentation"),
  364. ("otp", "application/vnd.oasis.opendocument.presentation-template"),
  365. ("ods", "application/vnd.oasis.opendocument.spreadsheet"),
  366. ("ots", "application/vnd.oasis.opendocument.spreadsheet-template"),
  367. ("odt", "application/vnd.oasis.opendocument.text"),
  368. ("odm", "application/vnd.oasis.opendocument.text-master"),
  369. ("ott", "application/vnd.oasis.opendocument.text-template"),
  370. ("oth", "application/vnd.oasis.opendocument.text-web"),
  371. ("xo", "application/vnd.olpc-sugar"),
  372. ("dd2", "application/vnd.oma.dd2+xml"),
  373. ("oxt", "application/vnd.openofficeorg.extension"), ("pptx",
  374. "application/vnd.openxmlformats-officedocument.presentationml.presentation"), (
  375. "sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"), (
  376. "ppsx",
  377. "application/vnd.openxmlformats-officedocument.presentationml.slideshow"), (
  378. "potx",
  379. "application/vnd.openxmlformats-officedocument.presentationml.template"), (
  380. "xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"), (
  381. "xltx",
  382. "application/vnd.openxmlformats-officedocument.spreadsheetml.template"), (
  383. "docx",
  384. "application/vnd.openxmlformats-officedocument.wordprocessingml.document"), (
  385. "dotx",
  386. "application/vnd.openxmlformats-officedocument.wordprocessingml.template"),
  387. ("mgp", "application/vnd.osgeo.mapguide.package"),
  388. ("dp", "application/vnd.osgi.dp"),
  389. ("esa", "application/vnd.osgi.subsystem"),
  390. ("pdb", "application/vnd.palm"), ("pqa", "application/vnd.palm"),
  391. ("oprc", "application/vnd.palm"),
  392. ("paw", "application/vnd.pawaafile"),
  393. ("str", "application/vnd.pg.format"),
  394. ("ei6", "application/vnd.pg.osasli"),
  395. ("efif", "application/vnd.picsel"),
  396. ("wg", "application/vnd.pmi.widget"),
  397. ("plf", "application/vnd.pocketlearn"),
  398. ("pbd", "application/vnd.powerbuilder6"),
  399. ("box", "application/vnd.previewsystems.box"),
  400. ("mgz", "application/vnd.proteus.magazine"),
  401. ("qps", "application/vnd.publishare-delta-tree"),
  402. ("ptid", "application/vnd.pvi.ptid1"),
  403. ("qxd", "application/vnd.quark.quarkxpress"),
  404. ("qxt", "application/vnd.quark.quarkxpress"),
  405. ("qwd", "application/vnd.quark.quarkxpress"),
  406. ("qwt", "application/vnd.quark.quarkxpress"),
  407. ("qxl", "application/vnd.quark.quarkxpress"),
  408. ("qxb", "application/vnd.quark.quarkxpress"),
  409. ("bed", "application/vnd.realvnc.bed"),
  410. ("mxl", "application/vnd.recordare.musicxml"),
  411. ("musicxml", "application/vnd.recordare.musicxml+xml"),
  412. ("cryptonote", "application/vnd.rig.cryptonote"),
  413. ("cod", "application/vnd.rim.cod"),
  414. ("rm", "application/vnd.rn-realmedia"),
  415. ("rmvb", "application/vnd.rn-realmedia-vbr"),
  416. ("link66", "application/vnd.route66.link66+xml"),
  417. ("st", "application/vnd.sailingtracker.track"),
  418. ("see", "application/vnd.seemail"), ("sema", "application/vnd.sema"),
  419. ("semd", "application/vnd.semd"), ("semf", "application/vnd.semf"),
  420. ("ifm", "application/vnd.shana.informed.formdata"),
  421. ("itp", "application/vnd.shana.informed.formtemplate"),
  422. ("iif", "application/vnd.shana.informed.interchange"),
  423. ("ipk", "application/vnd.shana.informed.package"),
  424. ("twd", "application/vnd.simtech-mindmapper"),
  425. ("twds", "application/vnd.simtech-mindmapper"),
  426. ("mmf", "application/vnd.smaf"),
  427. ("teacher", "application/vnd.smart.teacher"),
  428. ("sdkm", "application/vnd.solent.sdkm+xml"),
  429. ("sdkd", "application/vnd.solent.sdkm+xml"),
  430. ("dxp", "application/vnd.spotfire.dxp"),
  431. ("sfs", "application/vnd.spotfire.sfs"),
  432. ("sdc", "application/vnd.stardivision.calc"),
  433. ("sda", "application/vnd.stardivision.draw"),
  434. ("sdd", "application/vnd.stardivision.impress"),
  435. ("smf", "application/vnd.stardivision.math"),
  436. ("sdw", "application/vnd.stardivision.writer"),
  437. ("vor", "application/vnd.stardivision.writer"),
  438. ("sgl", "application/vnd.stardivision.writer-global"),
  439. ("smzip", "application/vnd.stepmania.package"),
  440. ("sm", "application/vnd.stepmania.stepchart"),
  441. ("sxc", "application/vnd.sun.xml.calc"),
  442. ("stc", "application/vnd.sun.xml.calc.template"),
  443. ("sxd", "application/vnd.sun.xml.draw"),
  444. ("std", "application/vnd.sun.xml.draw.template"),
  445. ("sxi", "application/vnd.sun.xml.impress"),
  446. ("sti", "application/vnd.sun.xml.impress.template"),
  447. ("sxm", "application/vnd.sun.xml.math"),
  448. ("sxw", "application/vnd.sun.xml.writer"),
  449. ("sxg", "application/vnd.sun.xml.writer.global"),
  450. ("stw", "application/vnd.sun.xml.writer.template"),
  451. ("sus", "application/vnd.sus-calendar"),
  452. ("susp", "application/vnd.sus-calendar"),
  453. ("svd", "application/vnd.svd"),
  454. ("sis", "application/vnd.symbian.install"),
  455. ("sisx", "application/vnd.symbian.install"),
  456. ("xsm", "application/vnd.syncml+xml"),
  457. ("bdm", "application/vnd.syncml.dm+wbxml"),
  458. ("xdm", "application/vnd.syncml.dm+xml"),
  459. ("tao", "application/vnd.tao.intent-module-archive"),
  460. ("pcap", "application/vnd.tcpdump.pcap"),
  461. ("cap", "application/vnd.tcpdump.pcap"),
  462. ("dmp", "application/vnd.tcpdump.pcap"),
  463. ("tmo", "application/vnd.tmobile-livetv"),
  464. ("tpt", "application/vnd.trid.tpt"),
  465. ("mxs", "application/vnd.triscape.mxs"),
  466. ("tra", "application/vnd.trueapp"), ("ufd", "application/vnd.ufdl"),
  467. ("ufdl", "application/vnd.ufdl"),
  468. ("utz", "application/vnd.uiq.theme"),
  469. ("umj", "application/vnd.umajin"),
  470. ("unityweb", "application/vnd.unity"),
  471. ("uoml", "application/vnd.uoml+xml"), ("vcx", "application/vnd.vcx"),
  472. ("vsd", "application/vnd.visio"), ("vst", "application/vnd.visio"),
  473. ("vss", "application/vnd.visio"), ("vsw", "application/vnd.visio"),
  474. ("vis", "application/vnd.visionary"), ("vsf", "application/vnd.vsf"),
  475. ("wbxml", "application/vnd.wap.wbxml"),
  476. ("wmlc", "application/vnd.wap.wmlc"),
  477. ("wmlsc", "application/vnd.wap.wmlscriptc"),
  478. ("wtb", "application/vnd.webturbo"),
  479. ("nbp", "application/vnd.wolfram.player"),
  480. ("wpd", "application/vnd.wordperfect"),
  481. ("wqd", "application/vnd.wqd"), ("stf", "application/vnd.wt.stf"),
  482. ("xar", "application/vnd.xara"), ("xfdl", "application/vnd.xfdl"),
  483. ("hvd", "application/vnd.yamaha.hv-dic"),
  484. ("hvs", "application/vnd.yamaha.hv-script"),
  485. ("hvp", "application/vnd.yamaha.hv-voice"),
  486. ("osf", "application/vnd.yamaha.openscoreformat"),
  487. ("osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"),
  488. ("saf", "application/vnd.yamaha.smaf-audio"),
  489. ("spf", "application/vnd.yamaha.smaf-phrase"),
  490. ("cmp", "application/vnd.yellowriver-custom-menu"),
  491. ("zir", "application/vnd.zul"), ("zirz", "application/vnd.zul"),
  492. ("zaz", "application/vnd.zzazz.deck+xml"),
  493. ("vxml", "application/voicexml+xml"), ("wasm", "application/wasm"),
  494. ("wgt", "application/widget"), ("hlp", "application/winhlp"),
  495. ("wsdl", "application/wsdl+xml"),
  496. ("wspolicy", "application/wspolicy+xml"),
  497. ("7z", "application/x-7z-compressed"),
  498. ("abw", "application/x-abiword"),
  499. ("ace", "application/x-ace-compressed"),
  500. ("dmg", "application/x-apple-diskimage"),
  501. ("aab", "application/x-authorware-bin"),
  502. ("x32", "application/x-authorware-bin"),
  503. ("u32", "application/x-authorware-bin"),
  504. ("vox", "application/x-authorware-bin"),
  505. ("aam", "application/x-authorware-map"),
  506. ("aas", "application/x-authorware-seg"),
  507. ("bcpio", "application/x-bcpio"),
  508. ("torrent", "application/x-bittorrent"),
  509. ("blb", "application/x-blorb"), ("blorb", "application/x-blorb"),
  510. ("bz", "application/x-bzip"), ("bz2", "application/x-bzip2"),
  511. ("boz", "application/x-bzip2"), ("cbr", "application/x-cbr"),
  512. ("cba", "application/x-cbr"), ("cbt", "application/x-cbr"),
  513. ("cbz", "application/x-cbr"), ("cb7", "application/x-cbr"),
  514. ("vcd", "application/x-cdlink"),
  515. ("cfs", "application/x-cfs-compressed"),
  516. ("chat", "application/x-chat"), ("pgn", "application/x-chess-pgn"),
  517. ("nsc", "application/x-conference"), ("cpio", "application/x-cpio"),
  518. ("csh", "application/x-csh"), ("deb", "application/x-debian-package"),
  519. ("udeb", "application/x-debian-package"),
  520. ("dgc", "application/x-dgc-compressed"),
  521. ("dir", "application/x-director"), ("dcr", "application/x-director"),
  522. ("dxr", "application/x-director"), ("cst", "application/x-director"),
  523. ("cct", "application/x-director"), ("cxt", "application/x-director"),
  524. ("w3d", "application/x-director"), ("fgd", "application/x-director"),
  525. ("swa", "application/x-director"), ("wad", "application/x-doom"),
  526. ("ncx", "application/x-dtbncx+xml"),
  527. ("dtb", "application/x-dtbook+xml"),
  528. ("res", "application/x-dtbresource+xml"),
  529. ("dvi", "application/x-dvi"), ("evy", "application/x-envoy"),
  530. ("eva", "application/x-eva"), ("bdf", "application/x-font-bdf"),
  531. ("gsf", "application/x-font-ghostscript"),
  532. ("psf", "application/x-font-linux-psf"),
  533. ("pcf", "application/x-font-pcf"), ("snf", "application/x-font-snf"),
  534. ("pfa", "application/x-font-type1"),
  535. ("pfb", "application/x-font-type1"),
  536. ("pfm", "application/x-font-type1"),
  537. ("afm", "application/x-font-type1"), ("arc", "application/x-freearc"),
  538. ("spl", "application/x-futuresplash"),
  539. ("gca", "application/x-gca-compressed"),
  540. ("ulx", "application/x-glulx"),
  541. ("gnumeric", "application/x-gnumeric"),
  542. ("gramps", "application/x-gramps-xml"),
  543. ("gtar", "application/x-gtar"), ("hdf", "application/x-hdf"),
  544. ("install", "application/x-install-instructions"),
  545. ("iso", "application/x-iso9660-image"),
  546. ("jnlp", "application/x-java-jnlp-file"),
  547. ("latex", "application/x-latex"),
  548. ("lzh", "application/x-lzh-compressed"),
  549. ("lha", "application/x-lzh-compressed"), ("mie", "application/x-mie"),
  550. ("prc", "application/x-mobipocket-ebook"),
  551. ("mobi", "application/x-mobipocket-ebook"),
  552. ("application", "application/x-ms-application"),
  553. ("lnk", "application/x-ms-shortcut"), ("wmd", "application/x-ms-wmd"),
  554. ("wmz", "application/x-ms-wmz"), ("xbap", "application/x-ms-xbap"),
  555. ("mdb", "application/x-msaccess"), ("obd", "application/x-msbinder"),
  556. ("crd", "application/x-mscardfile"), ("clp", "application/x-msclip"),
  557. ("exe", "application/x-msdownload"),
  558. ("dll", "application/x-msdownload"),
  559. ("com", "application/x-msdownload"),
  560. ("bat", "application/x-msdownload"),
  561. ("msi", "application/x-msdownload"),
  562. ("mvb", "application/x-msmediaview"),
  563. ("m13", "application/x-msmediaview"),
  564. ("m14", "application/x-msmediaview"),
  565. ("wmf", "application/x-msmetafile"),
  566. ("wmz", "application/x-msmetafile"),
  567. ("emf", "application/x-msmetafile"),
  568. ("emz", "application/x-msmetafile"), ("mny", "application/x-msmoney"),
  569. ("pub", "application/x-mspublisher"),
  570. ("scd", "application/x-msschedule"),
  571. ("trm", "application/x-msterminal"), ("wri", "application/x-mswrite"),
  572. ("nc", "application/x-netcdf"), ("cdf", "application/x-netcdf"),
  573. ("nzb", "application/x-nzb"), ("p12", "application/x-pkcs12"),
  574. ("pfx", "application/x-pkcs12"),
  575. ("p7b", "application/x-pkcs7-certificates"),
  576. ("spc", "application/x-pkcs7-certificates"),
  577. ("p7r", "application/x-pkcs7-certreqresp"),
  578. ("rar", "application/x-rar-compressed"),
  579. ("ris", "application/x-research-info-systems"),
  580. ("sh", "application/x-sh"), ("shar", "application/x-shar"),
  581. ("swf", "application/x-shockwave-flash"),
  582. ("xap", "application/x-silverlight-app"),
  583. ("sql", "application/x-sql"), ("sit", "application/x-stuffit"),
  584. ("sitx", "application/x-stuffitx"), ("srt", "application/x-subrip"),
  585. ("sv4cpio", "application/x-sv4cpio"),
  586. ("sv4crc", "application/x-sv4crc"),
  587. ("t3", "application/x-t3vm-image"), ("gam", "application/x-tads"),
  588. ("tar", "application/x-tar"), ("tcl", "application/x-tcl"),
  589. ("tex", "application/x-tex"), ("tfm", "application/x-tex-tfm"),
  590. ("texinfo", "application/x-texinfo"),
  591. ("texi", "application/x-texinfo"), ("obj", "application/x-tgif"),
  592. ("ustar", "application/x-ustar"),
  593. ("src", "application/x-wais-source"),
  594. ("der", "application/x-x509-ca-cert"),
  595. ("crt", "application/x-x509-ca-cert"), ("fig", "application/x-xfig"),
  596. ("xlf", "application/x-xliff+xml"),
  597. ("xpi", "application/x-xpinstall"), ("xz", "application/x-xz"),
  598. ("z1", "application/x-zmachine"), ("z2", "application/x-zmachine"),
  599. ("z3", "application/x-zmachine"), ("z4", "application/x-zmachine"),
  600. ("z5", "application/x-zmachine"), ("z6", "application/x-zmachine"),
  601. ("z7", "application/x-zmachine"), ("z8", "application/x-zmachine"),
  602. ("xaml", "application/xaml+xml"),
  603. ("xdf", "application/xcap-diff+xml"),
  604. ("xenc", "application/xenc+xml"), ("xhtml", "application/xhtml+xml"),
  605. ("xht", "application/xhtml+xml"), ("xml", "application/xml"),
  606. ("xsl", "application/xml"), ("dtd", "application/xml-dtd"),
  607. ("xop", "application/xop+xml"), ("xpl", "application/xproc+xml"),
  608. ("xslt", "application/xslt+xml"), ("xspf", "application/xspf+xml"),
  609. ("mxml", "application/xv+xml"), ("xhvml", "application/xv+xml"),
  610. ("xvml", "application/xv+xml"), ("xvm", "application/xv+xml"),
  611. ("yang", "application/yang"), ("yin", "application/yin+xml"),
  612. ("zip", "application/zip"), ("adp", "audio/adpcm"),
  613. ("au", "audio/basic"), ("snd", "audio/basic"), ("mid", "audio/midi"),
  614. ("midi", "audio/midi"), ("kar", "audio/midi"), ("rmi", "audio/midi"),
  615. ("m4a", "audio/mp4"), ("mp4a", "audio/mp4"), ("mpga", "audio/mpeg"),
  616. ("mp2", "audio/mpeg"), ("mp2a", "audio/mpeg"), ("mp3", "audio/mpeg"),
  617. ("m2a", "audio/mpeg"), ("m3a", "audio/mpeg"), ("oga", "audio/ogg"),
  618. ("ogg", "audio/ogg"), ("spx", "audio/ogg"), ("opus", "audio/ogg"),
  619. ("s3m", "audio/s3m"), ("sil", "audio/silk"),
  620. ("uva", "audio/vnd.dece.audio"), ("uvva", "audio/vnd.dece.audio"),
  621. ("eol", "audio/vnd.digital-winds"), ("dra", "audio/vnd.dra"),
  622. ("dts", "audio/vnd.dts"), ("dtshd", "audio/vnd.dts.hd"),
  623. ("lvp", "audio/vnd.lucent.voice"),
  624. ("pya", "audio/vnd.ms-playready.media.pya"),
  625. ("ecelp4800", "audio/vnd.nuera.ecelp4800"),
  626. ("ecelp7470", "audio/vnd.nuera.ecelp7470"),
  627. ("ecelp9600", "audio/vnd.nuera.ecelp9600"), ("rip", "audio/vnd.rip"),
  628. ("weba", "audio/webm"), ("aac", "audio/x-aac"),
  629. ("aif", "audio/x-aiff"), ("aiff", "audio/x-aiff"),
  630. ("aifc", "audio/x-aiff"), ("caf", "audio/x-caf"),
  631. ("flac", "audio/x-flac"), ("mka", "audio/x-matroska"),
  632. ("m3u", "audio/x-mpegurl"), ("wax", "audio/x-ms-wax"),
  633. ("wma", "audio/x-ms-wma"), ("ram", "audio/x-pn-realaudio"),
  634. ("ra", "audio/x-pn-realaudio"),
  635. ("rmp", "audio/x-pn-realaudio-plugin"), ("wav", "audio/x-wav"),
  636. ("xm", "audio/xm"), ("cdx", "chemical/x-cdx"),
  637. ("cif", "chemical/x-cif"), ("cmdf", "chemical/x-cmdf"),
  638. ("cml", "chemical/x-cml"), ("csml", "chemical/x-csml"),
  639. ("xyz", "chemical/x-xyz"), ("ttc", "font/collection"),
  640. ("otf", "font/otf"), ("ttf", "font/ttf"), ("woff", "font/woff"),
  641. ("woff2", "font/woff2"), ("bmp", "image/bmp"), ("cgm", "image/cgm"),
  642. ("g3", "image/g3fax"), ("gif", "image/gif"), ("ief", "image/ief"),
  643. ("jpeg", "image/jpeg"), ("jpg", "image/jpeg"), ("jpe", "image/jpeg"),
  644. ("ktx", "image/ktx"), ("png", "image/png"),
  645. ("btif", "image/prs.btif"), ("sgi", "image/sgi"),
  646. ("svg", "image/svg+xml"), ("svgz", "image/svg+xml"),
  647. ("tiff", "image/tiff"), ("tif", "image/tiff"),
  648. ("psd", "image/vnd.adobe.photoshop"),
  649. ("uvi", "image/vnd.dece.graphic"), ("uvvi", "image/vnd.dece.graphic"),
  650. ("uvg", "image/vnd.dece.graphic"), ("uvvg", "image/vnd.dece.graphic"),
  651. ("djvu", "image/vnd.djvu"), ("djv", "image/vnd.djvu"),
  652. ("sub", "image/vnd.dvb.subtitle"), ("dwg", "image/vnd.dwg"),
  653. ("dxf", "image/vnd.dxf"), ("fbs", "image/vnd.fastbidsheet"),
  654. ("fpx", "image/vnd.fpx"), ("fst", "image/vnd.fst"),
  655. ("mmr", "image/vnd.fujixerox.edmics-mmr"),
  656. ("rlc", "image/vnd.fujixerox.edmics-rlc"),
  657. ("mdi", "image/vnd.ms-modi"), ("wdp", "image/vnd.ms-photo"),
  658. ("npx", "image/vnd.net-fpx"), ("wbmp", "image/vnd.wap.wbmp"),
  659. ("xif", "image/vnd.xiff"), ("webp", "image/webp"),
  660. ("3ds", "image/x-3ds"), ("ras", "image/x-cmu-raster"),
  661. ("cmx", "image/x-cmx"), ("fh", "image/x-freehand"),
  662. ("fhc", "image/x-freehand"), ("fh4", "image/x-freehand"),
  663. ("fh5", "image/x-freehand"), ("fh7", "image/x-freehand"),
  664. ("ico", "image/x-icon"), ("sid", "image/x-mrsid-image"),
  665. ("pcx", "image/x-pcx"), ("pic", "image/x-pict"),
  666. ("pct", "image/x-pict"), ("pnm", "image/x-portable-anymap"),
  667. ("pbm", "image/x-portable-bitmap"),
  668. ("pgm", "image/x-portable-graymap"),
  669. ("ppm", "image/x-portable-pixmap"), ("rgb", "image/x-rgb"),
  670. ("tga", "image/x-tga"), ("xbm", "image/x-xbitmap"),
  671. ("xpm", "image/x-xpixmap"), ("xwd", "image/x-xwindowdump"),
  672. ("eml", "message/rfc822"), ("mime", "message/rfc822"),
  673. ("igs", "model/iges"), ("iges", "model/iges"), ("msh", "model/mesh"),
  674. ("mesh", "model/mesh"), ("silo", "model/mesh"),
  675. ("dae", "model/vnd.collada+xml"), ("dwf", "model/vnd.dwf"),
  676. ("gdl", "model/vnd.gdl"), ("gtw", "model/vnd.gtw"),
  677. ("mts", "model/vnd.mts"), ("vtu", "model/vnd.vtu"),
  678. ("wrl", "model/vrml"), ("vrml", "model/vrml"),
  679. ("x3db", "model/x3d+binary"), ("x3dbz", "model/x3d+binary"),
  680. ("x3dv", "model/x3d+vrml"), ("x3dvz", "model/x3d+vrml"),
  681. ("x3d", "model/x3d+xml"), ("x3dz", "model/x3d+xml"),
  682. ("appcache", "text/cache-manifest"), ("ics", "text/calendar"),
  683. ("ifb", "text/calendar"), ("css", "text/css"), ("csv", "text/csv"),
  684. ("html", "text/html"), ("htm", "text/html"),
  685. ("js", "text/javascript"), ("mjs", "text/javascript"),
  686. ("n3", "text/n3"), ("txt", "text/plain"), ("text", "text/plain"),
  687. ("conf", "text/plain"), ("def", "text/plain"), ("list", "text/plain"),
  688. ("log", "text/plain"), ("in", "text/plain"),
  689. ("dsc", "text/prs.lines.tag"), ("rtx", "text/richtext"),
  690. ("sgml", "text/sgml"), ("sgm", "text/sgml"),
  691. ("tsv", "text/tab-separated-values"), ("t", "text/troff"),
  692. ("tr", "text/troff"), ("roff", "text/troff"), ("man", "text/troff"),
  693. ("me", "text/troff"), ("ms", "text/troff"), ("ttl", "text/turtle"),
  694. ("uri", "text/uri-list"), ("uris", "text/uri-list"),
  695. ("urls", "text/uri-list"), ("vcard", "text/vcard"),
  696. ("curl", "text/vnd.curl"), ("dcurl", "text/vnd.curl.dcurl"),
  697. ("mcurl", "text/vnd.curl.mcurl"), ("scurl", "text/vnd.curl.scurl"),
  698. ("sub", "text/vnd.dvb.subtitle"), ("fly", "text/vnd.fly"),
  699. ("flx", "text/vnd.fmi.flexstor"), ("gv", "text/vnd.graphviz"),
  700. ("3dml", "text/vnd.in3d.3dml"), ("spot", "text/vnd.in3d.spot"),
  701. ("jad", "text/vnd.sun.j2me.app-descriptor"),
  702. ("wml", "text/vnd.wap.wml"), ("wmls", "text/vnd.wap.wmlscript"),
  703. ("s", "text/x-asm"), ("asm", "text/x-asm"), ("c", "text/x-c"),
  704. ("cc", "text/x-c"), ("cxx", "text/x-c"), ("cpp", "text/x-c"),
  705. ("h", "text/x-c"), ("hh", "text/x-c"), ("dic", "text/x-c"),
  706. ("f", "text/x-fortran"), ("for", "text/x-fortran"),
  707. ("f77", "text/x-fortran"), ("f90", "text/x-fortran"),
  708. ("java", "text/x-java-source"), ("nfo", "text/x-nfo"),
  709. ("opml", "text/x-opml"), ("p", "text/x-pascal"),
  710. ("pas", "text/x-pascal"), ("etx", "text/x-setext"),
  711. ("sfv", "text/x-sfv"), ("uu", "text/x-uuencode"),
  712. ("vcs", "text/x-vcalendar"), ("vcf", "text/x-vcard"),
  713. ("3gp", "video/3gpp"), ("3g2", "video/3gpp2"), ("h261", "video/h261"),
  714. ("h263", "video/h263"), ("h264", "video/h264"),
  715. ("jpgv", "video/jpeg"), ("jpm", "video/jpm"), ("jpgm", "video/jpm"),
  716. ("mj2", "video/mj2"), ("mjp2", "video/mj2"), ("mp4", "video/mp4"),
  717. ("mp4v", "video/mp4"), ("mpg4", "video/mp4"), ("mpeg", "video/mpeg"),
  718. ("mpg", "video/mpeg"), ("mpe", "video/mpeg"), ("m1v", "video/mpeg"),
  719. ("m2v", "video/mpeg"), ("ogv", "video/ogg"),
  720. ("qt", "video/quicktime"), ("mov", "video/quicktime"),
  721. ("uvh", "video/vnd.dece.hd"), ("uvvh", "video/vnd.dece.hd"),
  722. ("uvm", "video/vnd.dece.mobile"), ("uvvm", "video/vnd.dece.mobile"),
  723. ("uvp", "video/vnd.dece.pd"), ("uvvp", "video/vnd.dece.pd"),
  724. ("uvs", "video/vnd.dece.sd"), ("uvvs", "video/vnd.dece.sd"),
  725. ("uvv", "video/vnd.dece.video"), ("uvvv", "video/vnd.dece.video"),
  726. ("dvb", "video/vnd.dvb.file"), ("fvt", "video/vnd.fvt"),
  727. ("mxu", "video/vnd.mpegurl"), ("m4u", "video/vnd.mpegurl"),
  728. ("pyv", "video/vnd.ms-playready.media.pyv"),
  729. ("uvu", "video/vnd.uvvu.mp4"), ("uvvu", "video/vnd.uvvu.mp4"),
  730. ("viv", "video/vnd.vivo"), ("webm", "video/webm"),
  731. ("f4v", "video/x-f4v"), ("fli", "video/x-fli"),
  732. ("flv", "video/x-flv"), ("m4v", "video/x-m4v"),
  733. ("mkv", "video/x-matroska"), ("mk3d", "video/x-matroska"),
  734. ("mks", "video/x-matroska"), ("mng", "video/x-mng"),
  735. ("asf", "video/x-ms-asf"), ("asx", "video/x-ms-asf"),
  736. ("vob", "video/x-ms-vob"), ("wm", "video/x-ms-wm"),
  737. ("wmv", "video/x-ms-wmv"), ("wmx", "video/x-ms-wmx"),
  738. ("wvx", "video/x-ms-wvx"), ("avi", "video/x-msvideo"),
  739. ("movie", "video/x-sgi-movie"), ("smv", "video/x-smv"),
  740. ("ice", "x-conference/x-cooltalk")]

Source Edit

Procs

  1. func getExt(mimedb: MimeDB; mimetype: string; default = "txt"): string {.
  2. ...raises: [], tags: [], forbids: [].}

Gets extension which corresponds to mimetype. Returns default if mimetype could not be found. Extensions are returned without the leading dot. mimetype is lowercased before querying mimedb. Source Edit

  1. func getMimetype(mimedb: MimeDB; ext: string; default = "text/plain"): string {.
  2. ...raises: [], tags: [], forbids: [].}

Gets mimetype which corresponds to ext. Returns default if ext could not be found. ext can start with an optional dot which is ignored. ext is lowercased before querying mimedb. Source Edit

  1. func newMimetypes(): MimeDB {....raises: [], tags: [], forbids: [].}

Creates a new Mimetypes database. The database will contain the most common mimetypes. Source Edit

  1. func register(mimedb: var MimeDB; ext: string; mimetype: string) {....raises: [],
  2. tags: [], forbids: [].}

Adds mimetype to the mimedb. mimetype and ext are lowercased before registering on mimedb. Source Edit