class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I've noticed this error with version 0.27 also. I have successfully used this class v0.25 and v0.26 in this script. I noticed this error uploading an MS Word 2003 document.
My log give this: Error: Incorrect type of file. LOG: system information - class version : 0.27 - GD version : 2.0.34 - supported image types : png jpg gif bmp - open_basedir : no restriction - language : en_GB source is an uploaded file - upload OK - file name OK - MIME type detected as application/msword application/msword by UNIX file() command - source variables file_src_name : Illinois WS.doc file_src_name_body : Illinois WS file_src_name_ext : doc file_src_pathname : /tmp/php7pbDYm file_src_mime : application/msword application/msword file_src_size : 30208 (max= 67108864) file_src_error : 0 process file to ../forms/ - file size OK
The MIME type detected repeats the name twice "application/msword application/msword" I added the MIME type doubled ("application/msword application/msword") and the upload was allowed. I tested with IE8 and Firefox 3 to rule out browser error. My PC has Word 2007 installed, and this is a Word 2003 file. I have not yet tested other Office Application Documents.Reply
My log give this:
Error: Incorrect type of file.
LOG: system information
- class version : 0.27
- GD version : 2.0.34
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
- MIME type detected as application/msword application/msword by UNIX file() command
- source variables
file_src_name : Illinois WS.doc
file_src_name_body : Illinois WS
file_src_name_ext : doc
file_src_pathname : /tmp/php7pbDYm
file_src_mime : application/msword application/msword
file_src_size : 30208 (max= 67108864)
file_src_error : 0
process file to ../forms/
- file size OK
The MIME type detected repeats the name twice "application/msword application/msword"
I added the MIME type doubled ("application/msword application/msword") and the upload was allowed. I tested with IE8 and Firefox 3 to rule out browser error. My PC has Word 2007 installed, and this is a Word 2003 file. I have not yet tested other Office Application Documents.