常见MIME类型设置方法


下面列出常用的文件对应的MIME类型:

Mime-Types(mime类型)              Dateiendung(扩展名)             Bedeutung
application/msexcel                   *.xls *.xla                       Microsoft Excel Dateien
application/mshelp                    *.hlp *.chm             Microsoft Windows Hilfe Dateien
application/mspowerpoint          *.ppt *.ppz *.pps *.pot         Microsoft Powerpoint Dateien
application/msword                   *.doc *.dot             Microsoft Word Dateien
application/octet-stream            *.exe              exe
application/pdf                         *.pdf             Adobe PDF-Dateien
application/postscript                *.ai *.eps *.ps         Adobe Postscript-Dateien
application/rtf                          *.rtf             Microsoft RTF-Dateien
application/x-httpd-php             *.php *.phtml         PHP-Dateien
application/x-javascript              *.js             serverseitige JavaScript-Dateien
application/x-shockwave-flash    *.swf *.cab             Flash Shockwave-Dateien
application/zip                         *.zip             ZIP-Archivdateien
audio/basic                             *.au *.snd             Sound-Dateien
audio/mpeg                            *.mp3             MPEG-Dateien
audio/x-midi                            *.mid *.midi             MIDI-Dateien
audio/x-mpeg                         *.mp2             MPEG-Dateien
audio/x-wav                           *.wav             Wav-Dateien
image/gif                               *.gif             GIF-Dateien
image/jpeg                            *.jpeg *.jpg *.jpe         JPEG-Dateien
image/x-windowdump             *.xwd             X-Windows Dump
text/css                                *.css             CSS Stylesheet-Dateien
text/html                              *.htm *.html *.shtml         -Dateien
text/javascript                       *.js             JavaScript-Dateien
text/plain                             *.txt             reine Textdateien
video/mpeg                          *.mpeg *.mpg *.mpe         MPEG-Dateien
video/vnd.rn-realvideo            *.rmvb              realplay-Dateien
video/quicktime                     *.qt *.mov             Quicktime-Dateien
video/vnd.vivo                       *viv *.vivo             Vivo-Dateien

flv application/octet-stream
application/x-shockwave-flash
 
 
如果你的电脑,WEB服务器是IIS
IIS--默认网站属性-->http 头-->MIME映射 -->文件类型 -->新类型
.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlc
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wbmp image/vnd.wap.wbmp
   如果你的电脑,WEB服务器是Apache
Apache安装目录下的conf/mime.types文件
增加:
text/vnd.wap.wml .wml
image/vnd.wap.wbmp .wbmp
application/vnd.wap.wmlc .wmlc
text/vnd.wap.wmls .wmls
application/vnd.wap.wmlsc .wmlsc

支持java下载:在iis中需要添加
.jad text/vnd.sun.j2me.app-descriptor
.jar application/java-archive
支持sis文件下载:在iis中需要添加
.sis application/vnd.symbian.install

常见MIME类型例表

序号

内容类型

文件扩展名

描述

1

application/msword

doc

Microsoft Word

2

application/octet-stream bin

dms lha lzh exe class

可执行程序

3

application/pdf

pdf

Adobe Acrobat

4

application/postscript

ai eps ps

PostScript

5

appication/powerpoint

ppt

Microsoft Powerpoint

6

appication/rtf

rtf

rtf 格式

7

appication/x-compress

z

unix 压缩文件

8

application/x-gzip

gz

gzip

9

application/x-gtar

gtar

tar 文档 (gnu 格式 )

10

application/x-shockwave-flash

swf

MacroMedia Flash

11

application/x-tar

tar

tar(4.3BSD)

12

application/zip

zip

winzip

13

audio/basic

au snd

sun/next 声音文件

14

audio/mpeg

mpeg mp2

Mpeg 声音文件

15

audio/x-aiff

mid midi rmf

Midi 格式

16

audio/x-pn-realaudio

ram ra

Real Audio 声音

17

audio/x-pn-realaudio-plugin

rpm

Real Audio 插件

18

audio/x-wav

wav

Microsoft Windows 声音

19

image/cgm

cgm

计算机图形元文件

20

image/gif

gif

COMPUSERVE GIF 图像

21

image/jpeg

jpeg jpg jpe

JPEG 图像

22

image/png

png

PNG 图像




你可能感兴趣的:(java,EE)