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")); 如果下載文件的文件名含有中文字符,如果不對其進(jìn)行硬編碼,客戶文件下載對話框中出現(xiàn)的文件名將會(huì)發(fā)生亂碼
|
|