Welcome Guest, Not a member yet? Register   Sign In
Can't upload .xls
#1

[eluser]frist44[/eluser]
If I set

Code:
$config['allowed_types'] = 'doc'

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

Code:
$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?
#2

[eluser]WebsiteDuck[/eluser]
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'
#3

[eluser]frist44[/eluser]
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?
#4

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

Code:
$this->file_type = unknown/data

In IE,

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

which makes it work in IE.

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




Theme © iAndrew 2016 - Forum software by © MyBB