Mime issue with uploading files

Having problems with allwoing doc and xls files to be uploaded, the rest work fine…

Here is what I have:


	$allowed_file_types = array(
	'image/pjpeg' => 'jpg',
	'image/jpeg' => 'jpg',
	'image/gif' => 'gif',
	'application/pdf' => 'pdf',
	'application/excel' => 'xls',
	'application/msword' => 'doc',
	'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'docx',
	'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'xlsx');

If I print the $allowed_file_types array the mime type shows as:

application/octet-stream

If I alter the mime type in the array for doc and xls both file types upload as xls files.

Maybe because the files were created in office 2010 but saved as the older file types?

Thanks

A quick google-fu turns up: What are the Microsoft Office MIME Types?
Which might be of help…

Hey,

Yea I have sussed all that out… As you can see with the code above I have the correct mime types set. I have also tried the option of:

application/vnd.ms-excel

for xls files…

docx, xlsx work fine but issues with doc and xls… Basically it comes back as a file type that is not allowed…

Cheers