add default mime type to fix #341
Showing
2 changed files
with
553 additions
and
0 deletions
| ... | @@ -76,6 +76,9 @@ func Run() { | ... | @@ -76,6 +76,9 @@ func Run() { |
| 76 | } | 76 | } |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | //init mime | ||
| 80 | initMime() | ||
| 81 | |||
| 79 | if SessionOn { | 82 | if SessionOn { |
| 80 | GlobalSessions, _ = session.NewManager(SessionProvider, | 83 | GlobalSessions, _ = session.NewManager(SessionProvider, |
| 81 | SessionName, | 84 | SessionName, | ... | ... |
mime.go
0 → 100644
| 1 | package beego | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "mime" | ||
| 5 | ) | ||
| 6 | |||
| 7 | var mimemaps map[string]string = map[string]string{ | ||
| 8 | "3dm": "x-world/x-3dmf", | ||
| 9 | "3dmf": "x-world/x-3dmf", | ||
| 10 | "7z": "application/x-7z-compressed", | ||
| 11 | "a": "application/octet-stream", | ||
| 12 | "aab": "application/x-authorware-bin", | ||
| 13 | "aam": "application/x-authorware-map", | ||
| 14 | "aas": "application/x-authorware-seg", | ||
| 15 | "abc": "text/vndabc", | ||
| 16 | "ace": "application/x-ace-compressed", | ||
| 17 | "acgi": "text/html", | ||
| 18 | "afl": "video/animaflex", | ||
| 19 | "ai": "application/postscript", | ||
| 20 | "aif": "audio/aiff", | ||
| 21 | "aifc": "audio/aiff", | ||
| 22 | "aiff": "audio/aiff", | ||
| 23 | "aim": "application/x-aim", | ||
| 24 | "aip": "text/x-audiosoft-intra", | ||
| 25 | "alz": "application/x-alz-compressed", | ||
| 26 | "ani": "application/x-navi-animation", | ||
| 27 | "aos": "application/x-nokia-9000-communicator-add-on-software", | ||
| 28 | "aps": "application/mime", | ||
| 29 | "arc": "application/x-arc-compressed", | ||
| 30 | "arj": "application/arj", | ||
| 31 | "art": "image/x-jg", | ||
| 32 | "asf": "video/x-ms-asf", | ||
| 33 | "asm": "text/x-asm", | ||
| 34 | "asp": "text/asp", | ||
| 35 | "asx": "application/x-mplayer2", | ||
| 36 | "au": "audio/basic", | ||
| 37 | "avi": "video/x-msvideo", | ||
| 38 | "avs": "video/avs-video", | ||
| 39 | "bcpio": "application/x-bcpio", | ||
| 40 | "bin": "application/mac-binary", | ||
| 41 | "bmp": "image/bmp", | ||
| 42 | "boo": "application/book", | ||
| 43 | "book": "application/book", | ||
| 44 | "boz": "application/x-bzip2", | ||
| 45 | "bsh": "application/x-bsh", | ||
| 46 | "bz2": "application/x-bzip2", | ||
| 47 | "bz": "application/x-bzip", | ||
| 48 | "c++": "text/plain", | ||
| 49 | "c": "text/x-c", | ||
| 50 | "cab": "application/vnd.ms-cab-compressed", | ||
| 51 | "cat": "application/vndms-pkiseccat", | ||
| 52 | "cc": "text/x-c", | ||
| 53 | "ccad": "application/clariscad", | ||
| 54 | "cco": "application/x-cocoa", | ||
| 55 | "cdf": "application/cdf", | ||
| 56 | "cer": "application/pkix-cert", | ||
| 57 | "cha": "application/x-chat", | ||
| 58 | "chat": "application/x-chat", | ||
| 59 | "chrt": "application/vnd.kde.kchart", | ||
| 60 | "class": "application/java", | ||
| 61 | "com": "text/plain", | ||
| 62 | "conf": "text/plain", | ||
| 63 | "cpio": "application/x-cpio", | ||
| 64 | "cpp": "text/x-c", | ||
| 65 | "cpt": "application/mac-compactpro", | ||
| 66 | "crl": "application/pkcs-crl", | ||
| 67 | "crt": "application/pkix-cert", | ||
| 68 | "crx": "application/x-chrome-extension", | ||
| 69 | "csh": "text/x-scriptcsh", | ||
| 70 | "css": "text/css", | ||
| 71 | "csv": "text/csv", | ||
| 72 | "cxx": "text/plain", | ||
| 73 | "dar": "application/x-dar", | ||
| 74 | "dcr": "application/x-director", | ||
| 75 | "deb": "application/x-debian-package", | ||
| 76 | "deepv": "application/x-deepv", | ||
| 77 | "def": "text/plain", | ||
| 78 | "der": "application/x-x509-ca-cert", | ||
| 79 | "dif": "video/x-dv", | ||
| 80 | "dir": "application/x-director", | ||
| 81 | "divx": "video/divx", | ||
| 82 | "dl": "video/dl", | ||
| 83 | "dmg": "application/x-apple-diskimage", | ||
| 84 | "doc": "application/msword", | ||
| 85 | "dot": "application/msword", | ||
| 86 | "dp": "application/commonground", | ||
| 87 | "drw": "application/drafting", | ||
| 88 | "dump": "application/octet-stream", | ||
| 89 | "dv": "video/x-dv", | ||
| 90 | "dvi": "application/x-dvi", | ||
| 91 | "dwf": "drawing/x-dwf=(old)", | ||
| 92 | "dwg": "application/acad", | ||
| 93 | "dxf": "application/dxf", | ||
| 94 | "dxr": "application/x-director", | ||
| 95 | "el": "text/x-scriptelisp", | ||
| 96 | "elc": "application/x-bytecodeelisp=(compiled=elisp)", | ||
| 97 | "eml": "message/rfc822", | ||
| 98 | "env": "application/x-envoy", | ||
| 99 | "eps": "application/postscript", | ||
| 100 | "es": "application/x-esrehber", | ||
| 101 | "etx": "text/x-setext", | ||
| 102 | "evy": "application/envoy", | ||
| 103 | "exe": "application/octet-stream", | ||
| 104 | "f77": "text/x-fortran", | ||
| 105 | "f90": "text/x-fortran", | ||
| 106 | "f": "text/x-fortran", | ||
| 107 | "fdf": "application/vndfdf", | ||
| 108 | "fif": "application/fractals", | ||
| 109 | "fli": "video/fli", | ||
| 110 | "flo": "image/florian", | ||
| 111 | "flv": "video/x-flv", | ||
| 112 | "flx": "text/vndfmiflexstor", | ||
| 113 | "fmf": "video/x-atomic3d-feature", | ||
| 114 | "for": "text/x-fortran", | ||
| 115 | "fpx": "image/vndfpx", | ||
| 116 | "frl": "application/freeloader", | ||
| 117 | "funk": "audio/make", | ||
| 118 | "g3": "image/g3fax", | ||
| 119 | "g": "text/plain", | ||
| 120 | "gif": "image/gif", | ||
| 121 | "gl": "video/gl", | ||
| 122 | "gsd": "audio/x-gsm", | ||
| 123 | "gsm": "audio/x-gsm", | ||
| 124 | "gsp": "application/x-gsp", | ||
| 125 | "gss": "application/x-gss", | ||
| 126 | "gtar": "application/x-gtar", | ||
| 127 | "gz": "application/x-compressed", | ||
| 128 | "gzip": "application/x-gzip", | ||
| 129 | "h": "text/x-h", | ||
| 130 | "hdf": "application/x-hdf", | ||
| 131 | "help": "application/x-helpfile", | ||
| 132 | "hgl": "application/vndhp-hpgl", | ||
| 133 | "hh": "text/x-h", | ||
| 134 | "hlb": "text/x-script", | ||
| 135 | "hlp": "application/hlp", | ||
| 136 | "hpg": "application/vndhp-hpgl", | ||
| 137 | "hpgl": "application/vndhp-hpgl", | ||
| 138 | "hqx": "application/binhex", | ||
| 139 | "hta": "application/hta", | ||
| 140 | "htc": "text/x-component", | ||
| 141 | "htm": "text/html", | ||
| 142 | "html": "text/html", | ||
| 143 | "htmls": "text/html", | ||
| 144 | "htt": "text/webviewhtml", | ||
| 145 | "htx": "text/html", | ||
| 146 | "ice": "x-conference/x-cooltalk", | ||
| 147 | "ico": "image/x-icon", | ||
| 148 | "ics": "text/calendar", | ||
| 149 | "icz": "text/calendar", | ||
| 150 | "idc": "text/plain", | ||
| 151 | "ief": "image/ief", | ||
| 152 | "iefs": "image/ief", | ||
| 153 | "iges": "application/iges", | ||
| 154 | "igs": "application/iges", | ||
| 155 | "ima": "application/x-ima", | ||
| 156 | "imap": "application/x-httpd-imap", | ||
| 157 | "inf": "application/inf", | ||
| 158 | "ins": "application/x-internett-signup", | ||
| 159 | "ip": "application/x-ip2", | ||
| 160 | "isu": "video/x-isvideo", | ||
| 161 | "it": "audio/it", | ||
| 162 | "iv": "application/x-inventor", | ||
| 163 | "ivr": "i-world/i-vrml", | ||
| 164 | "ivy": "application/x-livescreen", | ||
| 165 | "jam": "audio/x-jam", | ||
| 166 | "jav": "text/x-java-source", | ||
| 167 | "java": "text/x-java-source", | ||
| 168 | "jcm": "application/x-java-commerce", | ||
| 169 | "jfif-tbnl": "image/jpeg", | ||
| 170 | "jfif": "image/jpeg", | ||
| 171 | "jnlp": "application/x-java-jnlp-file", | ||
| 172 | "jpe": "image/jpeg", | ||
| 173 | "jpeg": "image/jpeg", | ||
| 174 | "jpg": "image/jpeg", | ||
| 175 | "jps": "image/x-jps", | ||
| 176 | "js": "application/javascript", | ||
| 177 | "json": "application/json", | ||
| 178 | "jut": "image/jutvision", | ||
| 179 | "kar": "audio/midi", | ||
| 180 | "karbon": "application/vnd.kde.karbon", | ||
| 181 | "kfo": "application/vnd.kde.kformula", | ||
| 182 | "flw": "application/vnd.kde.kivio", | ||
| 183 | "kml": "application/vnd.google-earth.kml+xml", | ||
| 184 | "kmz": "application/vnd.google-earth.kmz", | ||
| 185 | "kon": "application/vnd.kde.kontour", | ||
| 186 | "kpr": "application/vnd.kde.kpresenter", | ||
| 187 | "kpt": "application/vnd.kde.kpresenter", | ||
| 188 | "ksp": "application/vnd.kde.kspread", | ||
| 189 | "kwd": "application/vnd.kde.kword", | ||
| 190 | "kwt": "application/vnd.kde.kword", | ||
| 191 | "ksh": "text/x-scriptksh", | ||
| 192 | "la": "audio/nspaudio", | ||
| 193 | "lam": "audio/x-liveaudio", | ||
| 194 | "latex": "application/x-latex", | ||
| 195 | "lha": "application/lha", | ||
| 196 | "lhx": "application/octet-stream", | ||
| 197 | "list": "text/plain", | ||
| 198 | "lma": "audio/nspaudio", | ||
| 199 | "log": "text/plain", | ||
| 200 | "lsp": "text/x-scriptlisp", | ||
| 201 | "lst": "text/plain", | ||
| 202 | "lsx": "text/x-la-asf", | ||
| 203 | "ltx": "application/x-latex", | ||
| 204 | "lzh": "application/octet-stream", | ||
| 205 | "lzx": "application/lzx", | ||
| 206 | "m1v": "video/mpeg", | ||
| 207 | "m2a": "audio/mpeg", | ||
| 208 | "m2v": "video/mpeg", | ||
| 209 | "m3u": "audio/x-mpegurl", | ||
| 210 | "m": "text/x-m", | ||
| 211 | "man": "application/x-troff-man", | ||
| 212 | "manifest": "text/cache-manifest", | ||
| 213 | "map": "application/x-navimap", | ||
| 214 | "mar": "text/plain", | ||
| 215 | "mbd": "application/mbedlet", | ||
| 216 | "mc$": "application/x-magic-cap-package-10", | ||
| 217 | "mcd": "application/mcad", | ||
| 218 | "mcf": "text/mcf", | ||
| 219 | "mcp": "application/netmc", | ||
| 220 | "me": "application/x-troff-me", | ||
| 221 | "mht": "message/rfc822", | ||
| 222 | "mhtml": "message/rfc822", | ||
| 223 | "mid": "application/x-midi", | ||
| 224 | "midi": "application/x-midi", | ||
| 225 | "mif": "application/x-frame", | ||
| 226 | "mime": "message/rfc822", | ||
| 227 | "mjf": "audio/x-vndaudioexplosionmjuicemediafile", | ||
| 228 | "mjpg": "video/x-motion-jpeg", | ||
| 229 | "mm": "application/base64", | ||
| 230 | "mme": "application/base64", | ||
| 231 | "mod": "audio/mod", | ||
| 232 | "moov": "video/quicktime", | ||
| 233 | "mov": "video/quicktime", | ||
| 234 | "movie": "video/x-sgi-movie", | ||
| 235 | "mp2": "audio/mpeg", | ||
| 236 | "mp3": "audio/mpeg3", | ||
| 237 | "mp4": "video/mp4", | ||
| 238 | "mpa": "audio/mpeg", | ||
| 239 | "mpc": "application/x-project", | ||
| 240 | "mpe": "video/mpeg", | ||
| 241 | "mpeg": "video/mpeg", | ||
| 242 | "mpg": "video/mpeg", | ||
| 243 | "mpga": "audio/mpeg", | ||
| 244 | "mpp": "application/vndms-project", | ||
| 245 | "mpt": "application/x-project", | ||
| 246 | "mpv": "application/x-project", | ||
| 247 | "mpx": "application/x-project", | ||
| 248 | "mrc": "application/marc", | ||
| 249 | "ms": "application/x-troff-ms", | ||
| 250 | "mv": "video/x-sgi-movie", | ||
| 251 | "my": "audio/make", | ||
| 252 | "mzz": "application/x-vndaudioexplosionmzz", | ||
| 253 | "nap": "image/naplps", | ||
| 254 | "naplps": "image/naplps", | ||
| 255 | "nc": "application/x-netcdf", | ||
| 256 | "ncm": "application/vndnokiaconfiguration-message", | ||
| 257 | "nif": "image/x-niff", | ||
| 258 | "niff": "image/x-niff", | ||
| 259 | "nix": "application/x-mix-transfer", | ||
| 260 | "nsc": "application/x-conference", | ||
| 261 | "nvd": "application/x-navidoc", | ||
| 262 | "o": "application/octet-stream", | ||
| 263 | "oda": "application/oda", | ||
| 264 | "odb": "application/vnd.oasis.opendocument.database", | ||
| 265 | "odc": "application/vnd.oasis.opendocument.chart", | ||
| 266 | "odf": "application/vnd.oasis.opendocument.formula", | ||
| 267 | "odg": "application/vnd.oasis.opendocument.graphics", | ||
| 268 | "odi": "application/vnd.oasis.opendocument.image", | ||
| 269 | "odm": "application/vnd.oasis.opendocument.text-master", | ||
| 270 | "odp": "application/vnd.oasis.opendocument.presentation", | ||
| 271 | "ods": "application/vnd.oasis.opendocument.spreadsheet", | ||
| 272 | "odt": "application/vnd.oasis.opendocument.text", | ||
| 273 | "oga": "audio/ogg", | ||
| 274 | "ogg": "audio/ogg", | ||
| 275 | "ogv": "video/ogg", | ||
| 276 | "omc": "application/x-omc", | ||
| 277 | "omcd": "application/x-omcdatamaker", | ||
| 278 | "omcr": "application/x-omcregerator", | ||
| 279 | "otc": "application/vnd.oasis.opendocument.chart-template", | ||
| 280 | "otf": "application/vnd.oasis.opendocument.formula-template", | ||
| 281 | "otg": "application/vnd.oasis.opendocument.graphics-template", | ||
| 282 | "oth": "application/vnd.oasis.opendocument.text-web", | ||
| 283 | "oti": "application/vnd.oasis.opendocument.image-template", | ||
| 284 | "otm": "application/vnd.oasis.opendocument.text-master", | ||
| 285 | "otp": "application/vnd.oasis.opendocument.presentation-template", | ||
| 286 | "ots": "application/vnd.oasis.opendocument.spreadsheet-template", | ||
| 287 | "ott": "application/vnd.oasis.opendocument.text-template", | ||
| 288 | "p10": "application/pkcs10", | ||
| 289 | "p12": "application/pkcs-12", | ||
| 290 | "p7a": "application/x-pkcs7-signature", | ||
| 291 | "p7c": "application/pkcs7-mime", | ||
| 292 | "p7m": "application/pkcs7-mime", | ||
| 293 | "p7r": "application/x-pkcs7-certreqresp", | ||
| 294 | "p7s": "application/pkcs7-signature", | ||
| 295 | "p": "text/x-pascal", | ||
| 296 | "part": "application/pro_eng", | ||
| 297 | "pas": "text/pascal", | ||
| 298 | "pbm": "image/x-portable-bitmap", | ||
| 299 | "pcl": "application/vndhp-pcl", | ||
| 300 | "pct": "image/x-pict", | ||
| 301 | "pcx": "image/x-pcx", | ||
| 302 | "pdb": "chemical/x-pdb", | ||
| 303 | "pdf": "application/pdf", | ||
| 304 | "pfunk": "audio/make", | ||
| 305 | "pgm": "image/x-portable-graymap", | ||
| 306 | "pic": "image/pict", | ||
| 307 | "pict": "image/pict", | ||
| 308 | "pkg": "application/x-newton-compatible-pkg", | ||
| 309 | "pko": "application/vndms-pkipko", | ||
| 310 | "pl": "text/x-scriptperl", | ||
| 311 | "plx": "application/x-pixclscript", | ||
| 312 | "pm4": "application/x-pagemaker", | ||
| 313 | "pm5": "application/x-pagemaker", | ||
| 314 | "pm": "text/x-scriptperl-module", | ||
| 315 | "png": "image/png", | ||
| 316 | "pnm": "application/x-portable-anymap", | ||
| 317 | "pot": "application/mspowerpoint", | ||
| 318 | "pov": "model/x-pov", | ||
| 319 | "ppa": "application/vndms-powerpoint", | ||
| 320 | "ppm": "image/x-portable-pixmap", | ||
| 321 | "pps": "application/mspowerpoint", | ||
| 322 | "ppt": "application/mspowerpoint", | ||
| 323 | "ppz": "application/mspowerpoint", | ||
| 324 | "pre": "application/x-freelance", | ||
| 325 | "prt": "application/pro_eng", | ||
| 326 | "ps": "application/postscript", | ||
| 327 | "psd": "application/octet-stream", | ||
| 328 | "pvu": "paleovu/x-pv", | ||
| 329 | "pwz": "application/vndms-powerpoint", | ||
| 330 | "py": "text/x-scriptphyton", | ||
| 331 | "pyc": "applicaiton/x-bytecodepython", | ||
| 332 | "qcp": "audio/vndqcelp", | ||
| 333 | "qd3": "x-world/x-3dmf", | ||
| 334 | "qd3d": "x-world/x-3dmf", | ||
| 335 | "qif": "image/x-quicktime", | ||
| 336 | "qt": "video/quicktime", | ||
| 337 | "qtc": "video/x-qtc", | ||
| 338 | "qti": "image/x-quicktime", | ||
| 339 | "qtif": "image/x-quicktime", | ||
| 340 | "ra": "audio/x-pn-realaudio", | ||
| 341 | "ram": "audio/x-pn-realaudio", | ||
| 342 | "rar": "application/x-rar-compressed", | ||
| 343 | "ras": "application/x-cmu-raster", | ||
| 344 | "rast": "image/cmu-raster", | ||
| 345 | "rexx": "text/x-scriptrexx", | ||
| 346 | "rf": "image/vndrn-realflash", | ||
| 347 | "rgb": "image/x-rgb", | ||
| 348 | "rm": "application/vndrn-realmedia", | ||
| 349 | "rmi": "audio/mid", | ||
| 350 | "rmm": "audio/x-pn-realaudio", | ||
| 351 | "rmp": "audio/x-pn-realaudio", | ||
| 352 | "rng": "application/ringing-tones", | ||
| 353 | "rnx": "application/vndrn-realplayer", | ||
| 354 | "roff": "application/x-troff", | ||
| 355 | "rp": "image/vndrn-realpix", | ||
| 356 | "rpm": "audio/x-pn-realaudio-plugin", | ||
| 357 | "rt": "text/vndrn-realtext", | ||
| 358 | "rtf": "text/richtext", | ||
| 359 | "rtx": "text/richtext", | ||
| 360 | "rv": "video/vndrn-realvideo", | ||
| 361 | "s": "text/x-asm", | ||
| 362 | "s3m": "audio/s3m", | ||
| 363 | "s7z": "application/x-7z-compressed", | ||
| 364 | "saveme": "application/octet-stream", | ||
| 365 | "sbk": "application/x-tbook", | ||
| 366 | "scm": "text/x-scriptscheme", | ||
| 367 | "sdml": "text/plain", | ||
| 368 | "sdp": "application/sdp", | ||
| 369 | "sdr": "application/sounder", | ||
| 370 | "sea": "application/sea", | ||
| 371 | "set": "application/set", | ||
| 372 | "sgm": "text/x-sgml", | ||
| 373 | "sgml": "text/x-sgml", | ||
| 374 | "sh": "text/x-scriptsh", | ||
| 375 | "shar": "application/x-bsh", | ||
| 376 | "shtml": "text/x-server-parsed-html", | ||
| 377 | "sid": "audio/x-psid", | ||
| 378 | "skd": "application/x-koan", | ||
| 379 | "skm": "application/x-koan", | ||
| 380 | "skp": "application/x-koan", | ||
| 381 | "skt": "application/x-koan", | ||
| 382 | "sit": "application/x-stuffit", | ||
| 383 | "sitx": "application/x-stuffitx", | ||
| 384 | "sl": "application/x-seelogo", | ||
| 385 | "smi": "application/smil", | ||
| 386 | "smil": "application/smil", | ||
| 387 | "snd": "audio/basic", | ||
| 388 | "sol": "application/solids", | ||
| 389 | "spc": "text/x-speech", | ||
| 390 | "spl": "application/futuresplash", | ||
| 391 | "spr": "application/x-sprite", | ||
| 392 | "sprite": "application/x-sprite", | ||
| 393 | "spx": "audio/ogg", | ||
| 394 | "src": "application/x-wais-source", | ||
| 395 | "ssi": "text/x-server-parsed-html", | ||
| 396 | "ssm": "application/streamingmedia", | ||
| 397 | "sst": "application/vndms-pkicertstore", | ||
| 398 | "step": "application/step", | ||
| 399 | "stl": "application/sla", | ||
| 400 | "stp": "application/step", | ||
| 401 | "sv4cpio": "application/x-sv4cpio", | ||
| 402 | "sv4crc": "application/x-sv4crc", | ||
| 403 | "svf": "image/vnddwg", | ||
| 404 | "svg": "image/svg+xml", | ||
| 405 | "svr": "application/x-world", | ||
| 406 | "swf": "application/x-shockwave-flash", | ||
| 407 | "t": "application/x-troff", | ||
| 408 | "talk": "text/x-speech", | ||
| 409 | "tar": "application/x-tar", | ||
| 410 | "tbk": "application/toolbook", | ||
| 411 | "tcl": "text/x-scripttcl", | ||
| 412 | "tcsh": "text/x-scripttcsh", | ||
| 413 | "tex": "application/x-tex", | ||
| 414 | "texi": "application/x-texinfo", | ||
| 415 | "texinfo": "application/x-texinfo", | ||
| 416 | "text": "text/plain", | ||
| 417 | "tgz": "application/gnutar", | ||
| 418 | "tif": "image/tiff", | ||
| 419 | "tiff": "image/tiff", | ||
| 420 | "tr": "application/x-troff", | ||
| 421 | "tsi": "audio/tsp-audio", | ||
| 422 | "tsp": "application/dsptype", | ||
| 423 | "tsv": "text/tab-separated-values", | ||
| 424 | "turbot": "image/florian", | ||
| 425 | "txt": "text/plain", | ||
| 426 | "uil": "text/x-uil", | ||
| 427 | "uni": "text/uri-list", | ||
| 428 | "unis": "text/uri-list", | ||
| 429 | "unv": "application/i-deas", | ||
| 430 | "uri": "text/uri-list", | ||
| 431 | "uris": "text/uri-list", | ||
| 432 | "ustar": "application/x-ustar", | ||
| 433 | "uu": "text/x-uuencode", | ||
| 434 | "uue": "text/x-uuencode", | ||
| 435 | "vcd": "application/x-cdlink", | ||
| 436 | "vcf": "text/x-vcard", | ||
| 437 | "vcard": "text/x-vcard", | ||
| 438 | "vcs": "text/x-vcalendar", | ||
| 439 | "vda": "application/vda", | ||
| 440 | "vdo": "video/vdo", | ||
| 441 | "vew": "application/groupwise", | ||
| 442 | "viv": "video/vivo", | ||
| 443 | "vivo": "video/vivo", | ||
| 444 | "vmd": "application/vocaltec-media-desc", | ||
| 445 | "vmf": "application/vocaltec-media-file", | ||
| 446 | "voc": "audio/voc", | ||
| 447 | "vos": "video/vosaic", | ||
| 448 | "vox": "audio/voxware", | ||
| 449 | "vqe": "audio/x-twinvq-plugin", | ||
| 450 | "vqf": "audio/x-twinvq", | ||
| 451 | "vql": "audio/x-twinvq-plugin", | ||
| 452 | "vrml": "application/x-vrml", | ||
| 453 | "vrt": "x-world/x-vrt", | ||
| 454 | "vsd": "application/x-visio", | ||
| 455 | "vst": "application/x-visio", | ||
| 456 | "vsw": "application/x-visio", | ||
| 457 | "w60": "application/wordperfect60", | ||
| 458 | "w61": "application/wordperfect61", | ||
| 459 | "w6w": "application/msword", | ||
| 460 | "wav": "audio/wav", | ||
| 461 | "wb1": "application/x-qpro", | ||
| 462 | "wbmp": "image/vnd.wap.wbmp", | ||
| 463 | "web": "application/vndxara", | ||
| 464 | "wiz": "application/msword", | ||
| 465 | "wk1": "application/x-123", | ||
| 466 | "wmf": "windows/metafile", | ||
| 467 | "wml": "text/vnd.wap.wml", | ||
| 468 | "wmlc": "application/vnd.wap.wmlc", | ||
| 469 | "wmls": "text/vnd.wap.wmlscript", | ||
| 470 | "wmlsc": "application/vnd.wap.wmlscriptc", | ||
| 471 | "word": "application/msword", | ||
| 472 | "wp5": "application/wordperfect", | ||
| 473 | "wp6": "application/wordperfect", | ||
| 474 | "wp": "application/wordperfect", | ||
| 475 | "wpd": "application/wordperfect", | ||
| 476 | "wq1": "application/x-lotus", | ||
| 477 | "wri": "application/mswrite", | ||
| 478 | "wrl": "application/x-world", | ||
| 479 | "wrz": "model/vrml", | ||
| 480 | "wsc": "text/scriplet", | ||
| 481 | "wsrc": "application/x-wais-source", | ||
| 482 | "wtk": "application/x-wintalk", | ||
| 483 | "x-png": "image/png", | ||
| 484 | "xbm": "image/x-xbitmap", | ||
| 485 | "xdr": "video/x-amt-demorun", | ||
| 486 | "xgz": "xgl/drawing", | ||
| 487 | "xif": "image/vndxiff", | ||
| 488 | "xl": "application/excel", | ||
| 489 | "xla": "application/excel", | ||
| 490 | "xlb": "application/excel", | ||
| 491 | "xlc": "application/excel", | ||
| 492 | "xld": "application/excel", | ||
| 493 | "xlk": "application/excel", | ||
| 494 | "xll": "application/excel", | ||
| 495 | "xlm": "application/excel", | ||
| 496 | "xls": "application/excel", | ||
| 497 | "xlt": "application/excel", | ||
| 498 | "xlv": "application/excel", | ||
| 499 | "xlw": "application/excel", | ||
| 500 | "xm": "audio/xm", | ||
| 501 | "xml": "text/xml", | ||
| 502 | "xmz": "xgl/movie", | ||
| 503 | "xpix": "application/x-vndls-xpix", | ||
| 504 | "xpm": "image/x-xpixmap", | ||
| 505 | "xsr": "video/x-amt-showrun", | ||
| 506 | "xwd": "image/x-xwd", | ||
| 507 | "xyz": "chemical/x-pdb", | ||
| 508 | "z": "application/x-compress", | ||
| 509 | "zip": "application/zip", | ||
| 510 | "zoo": "application/octet-stream", | ||
| 511 | "zsh": "text/x-scriptzsh", | ||
| 512 | "docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", | ||
| 513 | "docm": "application/vnd.ms-word.document.macroEnabled.12", | ||
| 514 | "dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", | ||
| 515 | "dotm": "application/vnd.ms-word.template.macroEnabled.12", | ||
| 516 | "xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", | ||
| 517 | "xlsm": "application/vnd.ms-excel.sheet.macroEnabled.12", | ||
| 518 | "xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", | ||
| 519 | "xltm": "application/vnd.ms-excel.template.macroEnabled.12", | ||
| 520 | "xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12", | ||
| 521 | "xlam": "application/vnd.ms-excel.addin.macroEnabled.12", | ||
| 522 | "pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", | ||
| 523 | "pptm": "application/vnd.ms-powerpoint.presentation.macroEnabled.12", | ||
| 524 | "ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", | ||
| 525 | "ppsm": "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", | ||
| 526 | "potx": "application/vnd.openxmlformats-officedocument.presentationml.template", | ||
| 527 | "potm": "application/vnd.ms-powerpoint.template.macroEnabled.12", | ||
| 528 | "ppam": "application/vnd.ms-powerpoint.addin.macroEnabled.12", | ||
| 529 | "sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", | ||
| 530 | "sldm": "application/vnd.ms-powerpoint.slide.macroEnabled.12", | ||
| 531 | "thmx": "application/vnd.ms-officetheme", | ||
| 532 | "onetoc": "application/onenote", | ||
| 533 | "onetoc2": "application/onenote", | ||
| 534 | "onetmp": "application/onenote", | ||
| 535 | "onepkg": "application/onenote", | ||
| 536 | "key": "application/x-iwork-keynote-sffkey", | ||
| 537 | "kth": "application/x-iwork-keynote-sffkth", | ||
| 538 | "nmbtemplate": "application/x-iwork-numbers-sfftemplate", | ||
| 539 | "numbers": "application/x-iwork-numbers-sffnumbers", | ||
| 540 | "pages": "application/x-iwork-pages-sffpages", | ||
| 541 | "template": "application/x-iwork-pages-sfftemplate", | ||
| 542 | "xpi": "application/x-xpinstall", | ||
| 543 | "oex": "application/x-opera-extension", | ||
| 544 | } | ||
| 545 | |||
| 546 | func initMime() { | ||
| 547 | for k, v := range mimemaps { | ||
| 548 | mime.AddExtensionType(k, v) | ||
| 549 | } | ||
| 550 | } |
-
Please register or sign in to post a comment