MIME Types以及导出文件

Known MIME Types

Hard-coded tests exist for the following MIME types that currently exist in URL Moniker.

text/richtext
text/html
audio/x-aiff
audio/basic
audio/wav
image/gif
image/jpeg
image/pjpeg
image/tiff
image/x-png
image/x-xbitmap
image/bmp
image/x-jg
image/x-emf
image/x-wmf
video/avi
video/mpeg
application/postscript
application/base64
application/macbinhex40
application/pdf
application/x-compressed
application/x-zip-compressed
application/x-gzip-compressed
application/java
application/x-msdownload

 

 

response.setContentType("application/x-msdownload");
response.setHeader("Content-Disposition","attachment;" + " filename="+new String(fileName.getBytes(), "ISO-8859-1"));

 如果下载文件的文件名含有中文字符,如果不对其进行硬编码,客户文件下载对话框中出现的文件名将会发生乱码 如果下载文件的文件名含有中文字符,如果不对其进行硬编码,如第18行所示,客户文件下载对话框中出现的文件名将会发生乱码

 

 

你可能感兴趣的:(MIME Types以及导出文件)