I always get tired of looking up content types so I created a static class file for it.
Use this class anytime you need to access content types in your code (like sending a user an attachment via a web interface).
Download the file at the bottom of this post.
using System; namespace Example.ContenTypes { public static class ContentType { public const string evy = "application/envoy"; public const string fif = "application/fractals"; public const string spl = "application/futuresplash"; public const string hta = "application/hta"; public const string acx = "application/internet-property-stream"; public const string hqx = "application/mac-binhex40"; public const string doc = "application/msword"; public const string dot = "application/msword"; public const string unknown = "application/octet-stream"; public const string bin = "application/octet-stream"; public const string Class = "application/octet-stream"; public const string dms = "application/octet-stream"; public const string exe = "application/octet-stream"; public const string lha = "application/octet-stream"; public const string lzh = "application/octet-stream"; public const string oda = "application/oda"; public const string axs = "application/olescript"; public const string pdf = "application/pdf"; public const string prf = "application/pics-rules"; public const string p10 = "application/pkcs10"; public const string crl = "application/pkix-crl"; public const string ai = "application/postscript"; public const string eps = "application/postscript"; public const string ps = "application/postscript"; public const string rtf = "application/rtf"; public const string setpay = "application/set-payment-initiation"; public const string setreg = "application/set-registration-initiation"; public const string xla = "application/vnd.ms-excel"; public const string xlc = "application/vnd.ms-excel"; public const string xlm = "application/vnd.ms-excel"; public const string xls = "application/vnd.ms-excel"; public const string xlt = "application/vnd.ms-excel"; public const string xlw = "application/vnd.ms-excel"; public const string msg = "application/vnd.ms-outlook"; public const string sst = "application/vnd.ms-pkicertstore"; public const string cat = "application/vnd.ms-pkiseccat"; public const string stl = "application/vnd.ms-pkistl"; public const string pot = "application/vnd.ms-powerpoint"; public const string pps = "application/vnd.ms-powerpoint"; public const string ppt = "application/vnd.ms-powerpoint"; public const string mpp = "application/vnd.ms-project"; public const string wcm = "application/vnd.ms-works"; public const string wdb = "application/vnd.ms-works"; public const string wks = "application/vnd.ms-works"; public const string wps = "application/vnd.ms-works"; public const string hlp = "application/winhlp"; public const string bcpio = "application/x-bcpio"; public const string cdf = "application/x-cdf"; public const string z = "application/x-compress"; public const string tgz = "application/x-compressed"; public const string cpio = "application/x-cpio"; public const string csh = "application/x-csh"; public const string dcr = "application/x-director"; public const string dir = "application/x-director"; public const string dxr = "application/x-director"; public const string dvi = "application/x-dvi"; public const string gtar = "application/x-gtar"; public const string gz = "application/x-gzip"; public const string hdf = "application/x-hdf"; public const string ins = "application/x-internet-signup"; public const string isp = "application/x-internet-signup"; public const string iii = "application/x-iphone"; public const string js = "application/x-javascript"; public const string latex = "application/x-latex"; public const string mdb = "application/x-msaccess"; public const string crd = "application/x-mscardfile"; public const string clp = "application/x-msclip"; public const string dll = "application/x-msdownload"; public const string m13 = "application/x-msmediaview"; public const string m14 = "application/x-msmediaview"; public const string mvb = "application/x-msmediaview"; public const string wmf = "application/x-msmetafile"; public const string mny = "application/x-msmoney"; public const string pub = "application/x-mspublisher"; public const string scd = "application/x-msschedule"; public const string trm = "application/x-msterminal"; public const string wri = "application/x-mswrite"; public const string nc = "application/x-netcdf"; public const string pma = "application/x-perfmon"; public const string pmc = "application/x-perfmon"; public const string pml = "application/x-perfmon"; public const string pmr = "application/x-perfmon"; public const string pmw = "application/x-perfmon"; public const string p12 = "application/x-pkcs12"; public const string pfx = "application/x-pkcs12"; public const string p7b = "application/x-pkcs7-certificates"; public const string spc = "application/x-pkcs7-certificates"; public const string p7r = "application/x-pkcs7-certreqresp"; public const string p7c = "application/x-pkcs7-mime"; public const string p7m = "application/x-pkcs7-mime"; public const string p7s = "application/x-pkcs7-signature"; public const string sh = "application/x-sh"; public const string shar = "application/x-shar"; public const string swf = "application/x-shockwave-flash"; public const string sit = "application/x-stuffit"; public const string sv4cpio = "application/x-sv4cpio"; public const string sv4crc = "application/x-sv4crc"; public const string tar = "application/x-tar"; public const string tcl = "application/x-tcl"; public const string tex = "application/x-tex"; public const string texi = "application/x-texinfo"; public const string texinfo = "application/x-texinfo"; public const string roff = "application/x-troff"; public const string t = "application/x-troff"; public const string tr = "application/x-troff"; public const string man = "application/x-troff-man"; public const string me = "application/x-troff-me"; public const string ms = "application/x-troff-ms"; public const string ustar = "application/x-ustar"; public const string src = "application/x-wais-source"; public const string cer = "application/x-x509-ca-cert"; public const string crt = "application/x-x509-ca-cert"; public const string der = "application/x-x509-ca-cert"; public const string pko = "application/ynd.ms-pkipko"; public const string zip = "application/zip"; public const string au = "audio/basic"; public const string snd = "audio/basic"; public const string mid = "audio/mid"; public const string rmi = "audio/mid"; public const string mp3 = "audio/mpeg"; public const string aif = "audio/x-aiff"; public const string aifc = "audio/x-aiff"; public const string aiff = "audio/x-aiff"; public const string m3u = "audio/x-mpegurl"; public const string ra = "audio/x-pn-realaudio"; public const string ram = "audio/x-pn-realaudio"; public const string wav = "audio/x-wav"; public const string bmp = "image/bmp"; public const string cod = "image/cis-cod"; public const string gif = "image/gif"; public const string ief = "image/ief"; public const string jpe = "image/jpeg"; public const string jpeg = "image/jpeg"; public const string jpg = "image/jpeg"; public const string jfif = "image/pipeg"; public const string svg = "image/svg+xml"; public const string tif = "image/tiff"; public const string tiff = "image/tiff"; public const string ras = "image/x-cmu-raster"; public const string cmx = "image/x-cmx"; public const string ico = "image/x-icon"; public const string pnm = "image/x-portable-anymap"; public const string pbm = "image/x-portable-bitmap"; public const string pgm = "image/x-portable-graymap"; public const string ppm = "image/x-portable-pixmap"; public const string rgb = "image/x-rgb"; public const string xbm = "image/x-xbitmap"; public const string xpm = "image/x-xpixmap"; public const string xwd = "image/x-xwindowdump"; public const string mht = "message/rfc822"; public const string mhtml = "message/rfc822"; public const string nws = "message/rfc822"; public const string css = "text/css"; public const string h323 = "text/h323"; public const string htm = "text/html"; public const string html = "text/html"; public const string stm = "text/html"; public const string uls = "text/iuls"; public const string bas = "text/plain"; public const string c = "text/plain"; public const string h = "text/plain"; public const string txt = "text/plain"; public const string rtx = "text/richtext"; public const string sct = "text/scriptlet"; public const string tsv = "text/tab-separated-values"; public const string htt = "text/webviewhtml"; public const string htc = "text/x-component"; public const string etx = "text/x-setext"; public const string vcf = "text/x-vcard"; public const string mp2 = "video/mpeg"; public const string mpa = "video/mpeg"; public const string mpe = "video/mpeg"; public const string mpeg = "video/mpeg"; public const string mpg = "video/mpeg"; public const string mpv2 = "video/mpeg"; public const string mov = "video/quicktime"; public const string qt = "video/quicktime"; public const string lsf = "video/x-la-asf"; public const string lsx = "video/x-la-asf"; public const string asf = "video/x-ms-asf"; public const string asr = "video/x-ms-asf"; public const string asx = "video/x-ms-asf"; public const string avi = "video/x-msvideo"; public const string movie = "video/x-sgi-movie"; public const string flr = "x-world/x-vrml"; public const string vrml = "x-world/x-vrml"; public const string wrl = "x-world/x-vrml"; public const string wrz = "x-world/x-vrml"; public const string xaf = "x-world/x-vrml"; public const string xof = "x-world/x-vrml"; } }
Download File
Leave a Reply
You must be logged in to post a comment.