IE保存docx xlsx变成zip的问题
伟大的Microsoft迄今为止还没有修复这个bug,自作多情的把自己发明的docx,xlsx等格式保存成zip文件,虽然那些文件的实质就是zip,但是绝不能容忍IE下载文件时把它们当做zip,总不能告诉用户让他们自己把下载好的文件改回docx或xlsx后缀吧,我的WEB服务器是nginx+centos5.5,出现这类错误是由于nginx的MIME出现了错误。
只需要在nginx的conf目录下的mime.types修改即可。
以下的是我把application相关的全部贴出来了,可以直接替换掉原application内容相关的。
[cc]application/vnd.ms-word.document.macroEnabled.12 docm;
application/vnd.openxmlformats docx pptx xlsx;
application/vnd.ms-word.template.macroEnabled.12 dotm;
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx;
application/vnd.ms-powerpoint.template.macroEnabled.12 potm;
application/vnd.openxmlformats-officedocument.presentationml.template potx;
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam;
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm;
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx;
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm;
application/vnd.ms-excel.addin.macroEnabled.12 xlam;
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb;
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm;
application/vnd.ms-excel xlt xla;
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx;
application/vnd.ms-excel.template.macroEnabled.12 xltm;
application/vnd.ms-xpsdocument xps
application/vnd.ms-powerpoint ppt pot pps ppa;
application/msword doc dot;
application/java-archive jar war ear;
application/mac-binhex40 hqx;
application/pdf pdf;
application/postscriptps eps ai;
application/rtf rtf;
application/vnd.ms-excel xls;
application/vnd.wap.wmlc wmlc;
application/vnd.wap.xhtml+xml xhtml;
application/vnd.google-earth.kml+xml kml;
application/vnd.google-earth.kmz kmz;
application/x-7z-compressed 7z;
application/x-cocoa cco;
application/x-java-archive-diff jardiff;
application/x-java-jnlp-file jnlp;
application/x-makeselfrun;
application/x-perlpl pm;
application/x-pilot prc pdb;
application/x-rar-compressed rar;
application/x-redhat-package-manager rpm;
application/x-sea sea;
application/x-shockwave-flash swf;
application/x-stuffit sit;
application/x-tcl tcl tk;
application/x-x509-ca-certder pem crt;
application/x-xpinstall xpi;
application/zip zip;
application/octet-stream bin exe dll;
application/octet-stream deb;
application/octet-stream dmg;
application/octet-stream eot;
application/octet-stream iso img;
application/octet-stream msi msp msm;[/cc]
版权声明:
作者:心飞翔
链接:https://www.faystar.com/techshare/website/244.html
来源:心飞翔
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论