// Reference https://github.com/jshttp/mime-db/blob/master/db.json
var mimetype_to_extension = {
  "application/epub+zip": ["epub"],
  "application/java-archive": ["jar","war","ear"],
  "application/java-vm": ["class"],
  "application/javascript": ["js"],
  "application/json": ["json","map"],
  "application/octet-stream": ["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],
  "application/pdf": ["pdf"],
  "application/rdf+xml": ["rdf"],
  "application/rtf": ["rtf"],
  "application/wsdl+xml": ["wsdl"],
  "application/x-cbr": ["cbr","cba","cbt","cbz","cb7"],
  "application/x-msdos-program": ["exe"],
  "application/x-shockwave-flash": ["swf"],
  "application/xhtml+xml": ["xhtml","xht"],
  "application/xml": ["xml","xsl","xsd"],
  "audio/mp4": ["mp4a","m4a"],
  "audio/mpeg": ["mpga","mp2","mp2a","mp3","m2a","m3a"],
  "audio/ogg": ["oga","ogg","spx"],
  "audio/wav": ["wav"],
  "audio/wave": ["wav"],
  "audio/webm": ["weba"],
  "audio/x-aac": ["aac"],
  "audio/x-aiff": ["aif","aiff","aifc"],
  "audio/x-caf": ["caf"],
  "audio/x-flac": ["flac"],
  "audio/x-m4a": ["m4a"],
  "audio/x-matroska": ["mka"],
  "audio/x-mpegurl": ["m3u"],
  "audio/x-ms-wax": ["wax"],
  "audio/x-ms-wma": ["wma"],
  "audio/x-pn-realaudio": ["ram","ra"],
  "audio/x-pn-realaudio-plugin": ["rmp"],
  "audio/x-realaudio": ["ra"],
  "audio/x-wav": ["wav"],
  "audio/xm": ["xm"],
  "image/bmp": ["bmp"],
  "image/cgm": ["cgm"],
  "image/g3fax": ["g3"],
  "image/gif": ["gif"],
  "image/ief": ["ief"],
  "image/jpeg": ["jpg","jpeg","jpe"],
  "image/ktx": ["ktx"],
  "image/png": ["png"],
  "image/prs.btif": ["btif"],
  "image/sgi": ["sgi"],
  "image/svg+xml": ["svg","svgz"],
  "image/tiff": ["tiff","tif"],
  "image/vnd.adobe.photoshop": ["psd"],
  "image/vnd.dece.graphic": ["uvi","uvvi","uvg","uvvg"],
  "image/vnd.djvu": ["djvu","djv"],
  "image/vnd.dvb.subtitle": ["sub"],
  "image/vnd.dwg": ["dwg"],
  "image/vnd.dxf": ["dxf"],
  "image/vnd.fastbidsheet": ["fbs"],
  "image/vnd.fpx": ["fpx"],
  "image/vnd.fst": ["fst"],
  "image/vnd.wap.wbmp": ["wbmp"],
  "image/vnd.xiff": ["xif"],
  "image/vnd.zbrush.pcx": [],
  "image/webp": ["webp"],
  "image/x-3ds": ["3ds"],
  "image/x-cmu-raster": ["ras"],
  "image/x-cmx": ["cmx"],
  "image/x-freehand": ["fh","fhc","fh4","fh5","fh7"],
  "image/x-icon": ["ico"],
  "image/x-jng": ["jng"],
  "image/x-mrsid-image": ["sid"],
  "image/x-ms-bmp": ["bmp"],
  "image/x-pcx": ["pcx"],
  "image/x-pict": ["pic","pct"],
  "image/x-portable-anymap": ["pnm"],
  "image/x-portable-bitmap": ["pbm"],
  "image/x-portable-graymap": ["pgm"],
  "image/x-portable-pixmap": ["ppm"],
  "image/x-rgb": ["rgb"],
  "image/x-tga": ["tga"],
  "image/x-xbitmap": ["xbm"],
  "image/x-xpixmap": ["xpm"],
  "image/x-xwindowdump": ["xwd"],
  "text/coffeescript": ["coffee","litcoffee"],
  "text/css": ["css"],
  "text/csv": ["csv"],
  "text/hjson": ["hjson"],
  "text/html": ["html","htm","shtml"],
  "text/jade": ["jade"],
  "text/jsx": ["jsx"],
  "text/less": ["less"],
  "text/mathml": ["mml"],
  "text/n3": ["n3"],
  "text/plain": ["txt","text","conf","def","list","log","in","ini"],
  "text/richtext": ["rtx"],
  "text/rtf": ["rtf"],
  "text/sgml": ["sgml","sgm"],
  "text/stylus": ["stylus","styl"],
  "text/tab-separated-values": ["tsv"],
  "text/troff": ["t","tr","roff","man","me","ms"],
  "text/turtle": ["ttl"],
  "text/uri-list": ["uri","uris","urls"],
  "text/vcard": ["vcard"],
  "text/vnd.dvb.subtitle": ["sub"],
  "text/x-asm": ["s","asm"],
  "text/x-c": ["c","cc","cxx","cpp","h","hh","dic"],
  "text/x-component": ["htc"],
  "text/x-fortran": ["f","for","f77","f90"],
  "text/x-handlebars-template": ["hbs"],
  "text/x-java-source": ["java"],
  "text/x-lua": ["lua"],
  "text/x-markdown": ["markdown","md","mkd"],
  "text/x-nfo": ["nfo"],
  "text/x-opml": ["opml"],
  "text/x-pascal": ["p","pas"],
  "text/x-processing": ["pde"],
  "text/x-sass": ["sass"],
  "text/x-scss": ["scss"],
  "text/x-setext": ["etx"],
  "text/x-sfv": ["sfv"],
  "text/x-uuencode": ["uu"],
  "text/x-vcalendar": ["vcs"],
  "text/x-vcard": ["vcf"],
  "text/xml": ["xml"],
  "text/yaml": ["yaml","yml"],
  "video/3gpp": ["3gp","3gpp"],
  "video/3gpp2": ["3g2"],
  "video/h261": ["h261"],
  "video/h263": ["h263"],
  "video/h264": ["h264"],
  "video/jpeg": ["jpgv"],
  "video/jpm": ["jpm","jpgm"],
  "video/mj2": ["mj2","mjp2"],
  "video/mp2t": ["ts"],
  "video/mp4": ["mp4","mp4v","mpg4"],
  "video/mpeg": ["mpeg","mpg","mpe","m1v","m2v"],
  "video/ogg": ["ogv"],
  "video/quicktime": ["qt","mov"],
  "video/webm": ["webm"],
  "video/x-f4v": ["f4v"],
  "video/x-fli": ["fli"],
  "video/x-flv": ["flv"],
  "video/x-m4v": ["m4v"],
  "video/x-matroska": ["mkv","mk3d","mks"],
  "video/x-mng": ["mng"],
  "video/x-ms-asf": ["asf","asx"],
  "video/x-ms-vob": ["vob"],
  "video/x-ms-wm": ["wm"],
  "video/x-ms-wmv": ["wmv"],
  "video/x-ms-wmx": ["wmx"],
  "video/x-ms-wvx": ["wvx"],
  "video/x-msvideo": ["avi"],
  "video/x-sgi-movie": ["movie"],
  "video/x-smv": ["smv"]
}
exports.extensions = function (mimetype) {
  return mimetype_to_extension[mimetype];
}
  "application/zip": ["zip"],
  "audio/midi": ["mid","midi","kar","rmi"],