• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't upload .xls

If I set

$config['allowed_types'] = 'doc'

I can upload a .doc file just fine. However, if I set

$config['allowed_types'] = 'xls';

and upload an .xls, I get an error saying "The filetype you are attempting to upload is not allowed."

Any ideas why .xls is behaving differently?

Maybe the file type is bad...are you sure its really an excel file? Or just a file with an xls extension?

The $_FILES['myfile']['type'] needs to match one of these: 'application/excel', 'application/vnd.ms-excel', 'application/msexcel'

I tried all 3 mimes in the mimes.php file with no luck. The file is good. I'm trying to use a few different ones, all that were created with excel 2003.

any other ideas?

I dug through the Upload.php file and found the is_allowed_filetype() function. I went through it and found that in firefox,

$this->file_type = unknown/data

In IE,

$this->file_type = application/vnd.ms-excel

which makes it work in IE.

Any idea why this might be different in FF????

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.