using System; using System.Collections.Generic; using System.Text; namespace HTEXLib.COMM.Helpers { public static class ContentTypeDict { public static readonly Dictionary extdict = new Dictionary { //{ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlsx"}, { "audio/x-ms-wma",".wma"}, {"video/3gpp",".3g2"}, {"audio/mp4",".aac"}, {"audio/ac3",".ac3"}, {"text/x-adasrc",".adb"}, {"image/x-applix-graphics",".ag"}, {"audio/amr",".amr"}, {"audio/x-ape",".ape"}, {"image/x-sony-arw",".arw"}, {"text/plain",".asc"}, {"video/x-ms-asf",".asf"}, {"text/x-ssa",".ass"}, {"video/x-msvideo",".avi"}, {"text/x-bibtex",".bib"}, {"image/bmp",".bmp"}, {"text/x-csrc",".c"}, {"text/x-c++src",".c++"}, {"image/cgm",".cgm"}, {"text/x-tex",".cls"}, {"text/x-cmake",".cmake"}, {"image/x-canon-cr2",".cr2"}, {"image/x-canon-crw",".crw"}, {"text/x-csharp",".cs"}, {"text/css",".css"}, {"text/csv",".csv"}, {"image/x-win-bitmap",".cur"}, {"text/x-dsrc",".d"}, {"text/x-dcl",".dcl"}, {"image/x-kodak-dcr",".dcr"}, {"image/x-dds",".dds"}, {"text/x-patch",".diff"}, {"image/vnd.djvu",".djv"}, {"image/x-adobe-dng",".dng"}, {"text/vnd.graphviz",".dot"}, {"text/x-dsl",".dsl"}, {"image/vnd.dwg",".dwg"}, {"image/vnd.dxf",".dxf"}, {"text/x-eiffel",".e"}, {"text/x-emacs-lisp",".el"}, {"image/x-emf",".emf"}, {"image/x-eps",".eps"}, {"image/x-bzeps",".eps.bz2"}, {"image/x-gzeps",".eps.gz"}, {"text/x-erlang",".erl"}, {"text/x-setext",".etx"}, {"image/x-exr",".exr"}, {"text/x-fortran",".f"}, {"image/x-xfig",".fig"}, {"image/fits",".fits"}, {"video/x-flv",".flv"}, {"text/x-xslfo",".fo"}, {"image/fax-g3",".g3"}, {"text/directory",".gcrd"}, {"image/gif",".gif"}, {"text/x-google-video-pointer",".gvp"}, {"text/x-chdr",".h"}, {"text/x-c++hdr",".h++"}, {"text/x-haskell",".hs"}, {"text/html",".htm"}, {"image/x-tga",".icb"}, {"image/x-icns",".icns"}, {"image/x-icon",".ico"}, {"text/calendar",".ics"}, {"text/x-idl",".idl"}, {"image/ief",".ief"}, {"image/x-iff",".iff"}, {"image/x-ilbm",".ilbm"}, {"text/x-imelody",".ime"}, {"text/x-iptables",".iptables"}, {"image/jp2",".j2k"}, {"text/vnd.sun.j2me.app-descriptor",".jad"}, {"text/x-java",".java"}, {"image/x-jng",".jng"}, {"image/jpeg",".jpeg"}, {"application/javascript",".js"}, {"application/json",".json"}, {"application/jsonp",".jsonp"}, {"image/x-kodak-k25",".k25"}, {"image/x-kodak-kdc",".kdc"}, {"text/x-ldif",".ldif"}, {"text/x-literate-haskell",".lhs"}, {"text/x-log",".log"}, {"text/x-lua",".lua"}, {"image/x-lwo",".lwo"}, {"image/x-lws",".lws"}, {"text/x-lilypond",".ly"}, {"text/x-matlab",".m"}, {"video/mpeg",".m2t"}, {"audio/x-mpegurl",".m3u"}, {"application/vnd.apple.mpegurl",".m3u8"}, {"text/x-troff-me",".me"}, {"video/x-matroska",".mkv"}, {"text/x-ocaml",".ml"}, {"text/x-troff-mm",".mm"}, {"text/mathml",".mml"}, {"text/x-moc",".moc"}, {"text/x-mof",".mof"}, {"audio/mpeg",".mp3"}, {"video/mp4",".mp4"}, {"text/x-mrml",".mrl"}, {"image/x-minolta-mrw",".mrw"}, {"text/x-troff-ms",".ms"}, {"image/x-msod",".msod"}, {"text/x-mup",".mup"}, {"image/x-nikon-nef",".nef"}, {"text/x-nfo",".nfo"}, {"text/x-ocl",".ocl"}, {"text/x-opml+xml",".opml"}, {"image/openraster",".ora"}, {"image/x-olympus-orf",".orf"}, {"text/x-pascal",".p"}, {"image/x-portable-bitmap",".pbm"}, {"image/x-photo-cd",".pcd"}, {"image/x-pcx",".pcx"}, {"application/pdf",".pdf"}, {"image/x-pentax-pef",".pef"}, {"image/x-portable-graymap",".pgm"}, {"image/x-pict",".pict"}, {"image/png",".png"}, {"image/x-portable-anymap",".pnm"}, {"image/x-macpaint",".pntg"}, {"text/x-gettext-translation",".po"}, {"text/x-gettext-translation-template",".pot"}, {"text/x-python",".py"}, {"image/x-quicktime",".qif"}, {"image/x-fuji-raf",".raf"}, {"image/x-cmu-raster",".ras"}, {"image/x-panasonic-raw",".raw"}, {"text/x-ms-regedit",".reg"}, {"image/x-rgb",".rgb"}, {"image/rle",".rle"}, {"text/troff",".roff"}, {"image/vnd.rn-realpix",".rp"}, {"text/vnd.rn-realtext",".rt"}, {"text/richtext",".rtx"}, {"text/x-scheme",".scm"}, {"image/x-sgi",".sgi"}, {"text/sgml",".sgm"}, {"image/x-skencil",".sk"}, {"text/spreadsheet",".slk"}, {"text/x-rpm-spec",".spec"}, {"text/x-sql",".sql"}, {"image/x-sony-sr2",".sr2"}, {"image/x-sony-srf",".srf"}, {"text/x-subviewer",".sub"}, {"image/x-sun-raster",".sun"}, {"image/svg+xml",".svg"}, {"image/svg+xml-compressed",".svgz"}, {"text/x-txt2tags",".t2t"}, {"text/x-tcl",".tcl"}, {"text/x-texinfo",".texi"}, {"image/tiff",".tif"}, {"audio/x-voc",".voc"}, {"image/x-wmf",".wmf"}, {"text/vnd.wap.wml",".wml"}, {"text/vnd.wap.wmlscript",".wmls"}, {"video/x-ms-wmv",".wmv"}, {"application/xhtml+xml",".xhtml"}, {"application/xml",".xml"} }; public static readonly Dictionary dict = new Dictionary { {".3g2", "video/3gpp"}, {".3ga", "video/3gpp"}, {".3gp", "video/3gpp"}, {".aac", "audio/mp4"}, {".ac3", "audio/ac3"}, {".adb", "text/x-adasrc"}, {".ads", "text/x-adasrc"}, {".ag", "image/x-applix-graphics"}, {".amr", "audio/amr"}, {".ape", "audio/x-ape"}, {".arw", "image/x-sony-arw"}, {".asc", "text/plain"}, {".asf", "video/x-ms-asf"}, {".ass", "text/x-ssa"}, {".avi", "video/x-msvideo"}, {".bib", "text/x-bibtex"}, {".bmp", "image/bmp"}, {".c", "text/x-csrc"}, {".c++", "text/x-c++src"}, {".cc", "text/x-c++src"}, {".cgm", "image/cgm"}, {".cls", "text/x-tex"}, {".cmake", "text/x-cmake"}, {".cpp", "text/x-c++src"}, {".cr2", "image/x-canon-cr2"}, {".crw", "image/x-canon-crw"}, {".cs", "text/x-csharp"}, {".css", "text/css"}, {".cssl", "text/css"}, {".csv", "text/csv"}, {".cur", "image/x-win-bitmap"}, {".cxx", "text/x-c++src"}, {".d", "text/x-dsrc"}, {".dcl", "text/x-dcl"}, {".dcr", "image/x-kodak-dcr"}, {".dds", "image/x-dds"}, {".diff", "text/x-patch"}, {".djv", "image/vnd.djvu"}, {".djvu", "image/vnd.djvu"}, {".dng", "image/x-adobe-dng"}, {".dot", "text/vnd.graphviz"}, {".dsl", "text/x-dsl"}, {".dtx", "text/x-tex"}, {".dwg", "image/vnd.dwg"}, {".dxf", "image/vnd.dxf"}, {".e", "text/x-eiffel"}, {".eif", "text/x-eiffel"}, {".el", "text/x-emacs-lisp"}, {".emf", "image/x-emf"}, {".eps", "image/x-eps"}, {".eps.bz2", "image/x-bzeps"}, {".eps.gz", "image/x-gzeps"}, {".epsf", "image/x-eps"}, {".epsf.bz2", "image/x-bzeps"}, {".epsf.gz", "image/x-gzeps"}, {".epsi", "image/x-eps"}, {".epsi.bz2", "image/x-bzeps"}, {".epsi.gz", "image/x-gzeps"}, {".erl", "text/x-erlang"}, {".etx", "text/x-setext"}, {".exr", "image/x-exr"}, {".f", "text/x-fortran"}, {".f90", "text/x-fortran"}, {".f95", "text/x-fortran"}, {".fig", "image/x-xfig"}, {".fits", "image/fits"}, {".flv", "video/x-flv"}, {".fo", "text/x-xslfo"}, {".for", "text/x-fortran"}, {".g3", "image/fax-g3"}, {".gcrd", "text/directory"}, {".gif", "image/gif"}, {".gv", "text/vnd.graphviz"}, {".gvp", "text/x-google-video-pointer"}, {".h", "text/x-chdr"}, {".h++", "text/x-c++hdr"}, {".hh", "text/x-c++hdr"}, {".hp", "text/x-c++hdr"}, {".hpp", "text/x-c++hdr"}, {".hs", "text/x-haskell"}, {".htm", "text/html"}, {".html", "text/html"}, {".hxx", "text/x-c++hdr"}, {".icb", "image/x-tga"}, {".icns", "image/x-icns"}, {".ico", "image/x-icon"}, {".ics", "text/calendar"}, {".idl", "text/x-idl"}, {".ief", "image/ief"}, {".iff", "image/x-iff"}, {".ilbm", "image/x-ilbm"}, {".ime", "text/x-imelody"}, {".imy", "text/x-imelody"}, {".ins", "text/x-tex"}, {".iptables", "text/x-iptables"}, {".j2k", "image/jp2"}, {".jad", "text/vnd.sun.j2me.app-descriptor"}, {".java", "text/x-java"}, {".jng", "image/x-jng"}, {".jp2", "image/jp2"}, {".jpc", "image/jp2"}, {".jpe", "image/jpeg"}, {".jpeg", "image/jpeg"}, {".jpf", "image/jp2"}, {".jpg", "image/jpeg"}, {".jpx", "image/jp2"}, {".js", "application/javascript"}, {".json", "application/json"}, {".jsonp", "application/jsonp"}, {".k25", "image/x-kodak-k25"}, {".kdc", "image/x-kodak-kdc"}, {".latex", "text/x-tex"}, {".ldif", "text/x-ldif"}, {".lhs", "text/x-literate-haskell"}, {".log", "text/x-log"}, {".ltx", "text/x-tex"}, {".lua", "text/x-lua"}, {".lwo", "image/x-lwo"}, {".lwob", "image/x-lwo"}, {".lws", "image/x-lws"}, {".ly", "text/x-lilypond"}, {".m", "text/x-matlab"}, {".m2t", "video/mpeg"}, {".m3u", "audio/x-mpegurl"}, {".m3u8", "application/vnd.apple.mpegurl"}, {".me", "text/x-troff-me"}, {".mkv", "video/x-matroska"}, {".ml", "text/x-ocaml"}, {".mli", "text/x-ocaml"}, {".mm", "text/x-troff-mm"}, {".mml", "text/mathml"}, {".moc", "text/x-moc"}, {".mof", "text/x-mof"}, {".mp2", "video/mpeg"}, {".mp3", "audio/mpeg"}, {".mp4", "video/mp4"}, {".mpe", "video/mpeg"}, {".mpeg", "video/mpeg"}, {".mpg", "video/mpeg"}, {".mrl", "text/x-mrml"}, {".mrml", "text/x-mrml"}, {".mrw", "image/x-minolta-mrw"}, {".ms", "text/x-troff-ms"}, {".msod", "image/x-msod"}, {".mup", "text/x-mup"}, {".nef", "image/x-nikon-nef"}, {".nfo", "text/x-nfo"}, {".not", "text/x-mup"}, {".ocl", "text/x-ocl"}, {".opml", "text/x-opml+xml"}, {".ora", "image/openraster"}, {".orf", "image/x-olympus-orf"}, {".p", "text/x-pascal"}, {".pas", "text/x-pascal"}, {".patch", "text/x-patch"}, {".pbm", "image/x-portable-bitmap"}, {".pcd", "image/x-photo-cd"}, {".pcx", "image/x-pcx"}, {".pdf", "application/pdf"}, {".pef", "image/x-pentax-pef"}, {".pgm", "image/x-portable-graymap"}, {".pict", "image/x-pict"}, {".pict1", "image/x-pict"}, {".pict2", "image/x-pict"}, {".png", "image/png"}, {".pnm", "image/x-portable-anymap"}, {".pntg", "image/x-macpaint"}, {".po", "text/x-gettext-translation"}, {".pot", "text/x-gettext-translation-template"}, {".py", "text/x-python"}, {".qif", "image/x-quicktime"}, {".qtif", "image/x-quicktime"}, {".raf", "image/x-fuji-raf"}, {".ras", "image/x-cmu-raster"}, {".raw", "image/x-panasonic-raw"}, {".reg", "text/x-ms-regedit"}, {".rgb", "image/x-rgb"}, {".rle", "image/rle"}, {".roff", "text/troff"}, {".rp", "image/vnd.rn-realpix"}, {".rt", "text/vnd.rn-realtext"}, {".rtx", "text/richtext"}, {".scm", "text/x-scheme"}, {".sgi", "image/x-sgi"}, {".sgm", "text/sgml"}, {".sgml", "text/sgml"}, {".sk", "image/x-skencil"}, {".sk1", "image/x-skencil"}, {".slk", "text/spreadsheet"}, {".spec", "text/x-rpm-spec"}, {".sql", "text/x-sql"}, {".sr2", "image/x-sony-sr2"}, {".srf", "image/x-sony-srf"}, {".ssa", "text/x-ssa"}, {".sty", "text/x-tex"}, {".sub", "text/x-subviewer"}, {".sun", "image/x-sun-raster"}, {".svg", "image/svg+xml"}, {".svgz", "image/svg+xml-compressed"}, {".sylk", "text/spreadsheet"}, {".t2t", "text/x-txt2tags"}, {".tcl", "text/x-tcl"}, {".tex", "text/x-tex"}, {".texi", "text/x-texinfo"}, {".texinfo", "text/x-texinfo"}, {".tga", "image/x-tga"}, {".tif", "image/tiff"}, {".tiff", "image/tiff"}, {".tk", "text/x-tcl"}, {".tpic", "image/x-tga"}, {".tr", "text/troff"}, {".txt", "text/plain"}, {".vob", "video/mpeg"}, {".voc", "audio/x-voc"}, {".wmf", "image/x-wmf"}, {".wml", "text/vnd.wap.wml"}, {".wmls", "text/vnd.wap.wmlscript"}, {".wmv", "video/x-ms-wmv"}, {".xhtml", "application/xhtml+xml"}, {".xml", "application/xml"} }; } }