Uploader.php function _file_mime_type fails in CI 2.1 |
[eluser]Djaka PM[/eluser]
Hi my name is Djaka, Currently I am facing an issue on the Upload library, I am using - CI 2.1.0 - PHP Version 5.3.6-13ubuntu3.6 The issue actually not in the CI framework, but in a PHP function called "Fileinfo" The Fileinfo function is called in CI`s _file_mime_type function inside Upload.php file , so my case is: I am try to upload csv file, I already make sure that the file extension is correct and the allowed mime types are "csv|txt". CI is already guess the file extension correctly("text/csv"), but by the time the CI called the "Fileinfo" function it return "text/plain", which is in my opinion is not correct. Is there any workaround? Some says that the "Fileinfo" is not quite reliable. http://stackoverflow.com/questions/46071...e-from-php For now I set the allowed mime types to wildcard, which will cause security issue. Thanks. |
Welcome Guest, Not a member yet? Register Sign In |