![]() |
Unacceptable file type Hi* Does anyone have File Cabinet working using fileinfo for checking file types? Last evening I had a 'discussion' with one of my hosts about a problem with File Cabinet. They had done some upgrades recently and I believe one of the changes was to install fileinfo. This caused File Cabinet to break on all my sites on that host. In tracking down the problem it seems that the function finfo_file is reporting the string 'application/pdf' as a mime type for pdf files. According to file_types.php* File Cabinet is expecting the string 'pdf document' when fileinfo is used. The same thing applies to other file types like images. As a result all file upload attempts were reporting 'Unacceptable file type'. Being a bit sceptical I installed fileinfo on a linux box of my own (FC11). And it has the same problem. My work around has been to hack File.php in ~/core/class to have the checkMimeType function look for responses defined for 'mct' instead of those defined for 'fi' when fileinfo is present. Is file_types.php incorrect? Perhaps my host and I are both working with a later version of fileinfo that reports differently that what is defined in file_types.php? Any other suggestions? Andrew P. |
الساعة الآن 10:46 AM |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.5.2 TranZ By
Almuhajir