I have searched quite extensively and cannot find a solution to my problem.
I have a file upload script which checks the file type to make sure that the file being uploaded is an image, a word doc, or an excel spreadsheet.
<-- Code Snippet -->
$allowed_types = array("image/bmp","image/tiff","image/gif","image/pjpeg","text/plain","image/jpeg","application/msword","application/vnd.ms-excel");
if (!in_array($the_file_type,$allowed_types)) {
$error .= "File type $the_file_type not allowed.";
return $error;
}
<-- End code snippet -->
I got a lot of this code from one of the articles posted here on file uploads.
The problem I am having is that when I upload a tif image, the server seems to think that I am uploading application/octet-stream. I found this out with some simple debug code.
Is this a function of my web browser not sending the correct mime type with the file, or is it the web server not getting the correct mime type for the file?
Browser: IE 5.5
Web Server: Apache 1.3.12 on Turbolinux Server 6
TIA