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 have some troubles with mime type detection when uploading a file that is 'application/msword'. Next is the printing of the class.upload log var after the operation:
system information - class version : 0.27 - GD version : 2.0.28 - supported image types : png jpg gif bmp - open_basedir : no restriction - language : es_ES 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 : comentarioskilkenny.doc file_src_name_body : comentarioskilkenny file_src_name_ext : doc file_src_pathname : /tmp/phpOxmR5s file_src_mime : application/msword application/msword file_src_size : 60416 (max= 8388608) file_src_error : 0
You can notice the file_src_mime as 'application/msword application/msword'. Could it be an error because of the file is weird? I have tried with many other files, and the mime type detected is the same. Or is it an error of the detection algorythm? Do I have to report it as a bug? where?
Hope someone can help. Cheers. Eugenio FioritiReply
Next is the printing of the class.upload log var after the operation:
system information
- class version : 0.27
- GD version : 2.0.28
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- language : es_ES
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 : comentarioskilkenny.doc
file_src_name_body : comentarioskilkenny
file_src_name_ext : doc
file_src_pathname : /tmp/phpOxmR5s
file_src_mime : application/msword application/msword
file_src_size : 60416 (max= 8388608)
file_src_error : 0
You can notice the file_src_mime as 'application/msword application/msword'. Could it be an error because of the file is weird? I have tried with many other files, and the mime type detected is the same. Or is it an error of the detection algorythm? Do I have to report it as a bug? where?
Hope someone can help. Cheers.
Eugenio Fioriti