Welcome Guest, Not a member yet? Register   Sign In
Uploader.php function _file_mime_type fails in CI 2.1
#4

[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.


Messages In This Thread
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 02-10-2012, 12:16 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 02-10-2012, 01:39 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 02-10-2012, 07:16 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-06-2012, 11:04 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-07-2012, 02:42 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-07-2012, 03:33 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-20-2012, 05:36 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-21-2012, 12:08 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-21-2012, 01:48 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-21-2012, 08:56 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-21-2012, 10:11 PM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-22-2012, 02:17 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-22-2012, 02:31 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 03-22-2012, 02:37 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 05-05-2012, 12:18 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 05-05-2012, 12:58 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 05-06-2012, 09:38 AM
Uploader.php function _file_mime_type fails in CI 2.1 - by El Forum - 07-03-2012, 04:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB