File upload mime-type problems we meet again |
[eluser]predi[/eluser]
Im using 2.1.3 I've got a problem uploading various files, for example "xls" ones using the "upload" library. Here's my "xls" definition in the mimes.php: Code: 'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel') Here's the code: Code: $this->load->library('upload', $config); And here's the output that i get: Code: // $_FILES tells us its a "application/vnd.ms-excel" and it's defined in the "xls" mimes Code: // the $_FILES global tells us "application/vnd.ms-excel" And here's the .htaccess just in case Code: AddType application/excel xls xlsx So... Why is the upload library recognizing mimes wrong?! Thx in advance, been struggling few hours so far...
[eluser]goFrendiAsgard[/eluser]
I'm not quite sure, but it seems there is a problem with upload library. Maybe this thread can help you http://ellislab.com/forums/viewthread/70998/
[eluser]predi[/eluser]
Me either. Its seems like its a OS (win7) problem. As CI uses system utils for mime recognition. As a temp solution i just added "application/msword" to "xls" mimes. Works, but still investigating... thx for yr reply btw
[eluser]InsiteFX[/eluser]
Detailed information for file extension XLS: -------------------------------------------------------------------------------- Primary association: Excel Company: Microsoft Corporation File classification: Spreadsheet Mime type: application/vnd.ms-excel [official], application/msexcel, application/x-msexcel, application/x-ms-excel, application/vnd.ms-excel, application/x-excel, application/x-dos_ms_excel, application/xls Identifying characters Hex: D0 CF 11 E0 A1 B1 1A E1 00 , ASCII: Program ID: Excel.Sheet.5 , Excel.Sheet.8 , soffice6.xls Related links: Free Microsoft Viewer, OpenOffice.org, Zoho Viewer (Web Viewer) |
Welcome Guest, Not a member yet? Register Sign In |