Had some troubles with Office 2007 files not being downloadable on our windows servers … did a bit of Googling and found this nice list of Office 2007 mime-types. Newer Office files are actually ZIP archives. That's why MIME Magic database is detecting them as ZIP files. You may need to add special rules based on file extension. In order for servers to recognize the new file formats in the 2007 Office system, you will need to register the Multipurpose Internet Mail Extensions (MIME. Note: The above list only includes the most commonly used Office 2007 MIME types. For a complete list of the document types addressed by SPR. My application recognizes and opens 2007 documents when i click to view them from my app because i set my Jaguar server to recognize the new 2007 mime types. Office 2007各种格式附件下载 后变成zip文件问题解决方法 从IIS或者Tomcat之类的Web服务器通过二进制流下载文件时(比如通过设置Header为Content-disposition. Apache web服务器的站点,下载pptx,docx,xlsx文件,却被浏览器当作zip文件保存。 这不是浏览器的问题,而是apache不认docx,pptx,,xlsx等Microsoft Office. PHP 5. 3. 5 fileinfo() MIME Type for MS Office 2. On a PHP upload, I'm trying to validate the MIME Type of the files being uploaded to match a valid set of MIME types for the application. When attempting to use the fileinfo() to determine the MIME type of an Office 2. NOT detecting as their appropriate MIME Types. Instead the MIME type response is "application/zip"Office Document MIME types: http: //filext. Example PHP Code: $o. File. Info = new finfo( FILEINFO_MIME_TYPE ); $s. Mime. Type = $o. File. Info - > file( $_FILES['Filedata']['tmp_name'] ); echo $s. Mime. Type; Server Setup Info: OS: Windows Server 2. Webserver: IIS 6. PHP: 5. 3. 5 (Thread Safe) using Fast. CGI 1. 5. File: magic. Example by darko at uvcms dot com 1. Apr- 2. 00. 8 0. 9: 3. Link: php. net/manual/en/fileinfo. Size: 5. 17 KBSource: Source Forge: GNU3. File. Type gnuwin. I've found numerous posts which refer to issues with the newer Office format when downloading from a webserver. In all these examples I haven't found anywhere that illustrates a manor of adding the new MIME types to an existing magic. Microsoft Office 2. MIME types. Thanks for your assistance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
September 2016
Categories |