Re: fileinfo returning wrong mime type for Excel files
| From: | Christoph Boget | Date: | Thu, 30 Jul 2009 13:51:20 +0000 |
| Subject: | Re: fileinfo returning wrong mime type for Excel files | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296059@lists.php.net to get a copy of this message | ||
>> Having said that, with file -i on my system, Word documents are
>> 'application/msword' and Excel files are 'application/octet-stream'
> Fedora11 (2.6.29.6-213.fc11.i586)
> $ file excel.xls
> excel.xls: CDF V2 Document, Little Endian, Os: Windows, Version 5.1, Code
> page: 1252, Author: ??????????????????????????, Last Saved By: ELAN, Name of
> Creating Application: Microsoft Excel, Last Printed: Sun Nov 6 18:04:20
> 2005, Create Time/Date: Tue Nov 1 02:56:47 2005, Security: 0
Red Hat 4.1.2-14
$ file excel.xls
excel.xls: Microsoft Office Document
I'm not getting all that extra information.
> $ file -i excel.xls
> excel.xls: application/vnd.ms-excel; charset=binary
$file -i excel.xls
excel.xls: application/msword
> I wonder if the problem lies with the documents themselves. Last May, I
> posted a msg here about how FileInfo was reporting back "application/msword
> application/msword" for some (but not all) Word docs. I never received a
> reply about it but came up with a hack to split on the space, if present.
I saw that post and that is something we are getting occasionally as
well. And it may perhaps be an issue with the documents themselves.
As I stated in a post I just made, the excel document I'm looking at
was created using Office 2007 for the Mac.
thnx,
Christoph