Welcome Guest, Not a member yet? Register   Sign In
MY_Upload - Extends CI_Upload to understand regular expressions in allowed MIME types array
#1

[eluser]Unknown[/eluser]
Hi all!

This is small extension that extends CI_Upload to understand regular expressions in allowed MIME types array.

Now you can use regular expression in mimes.php, just enclose them in slashes.

Example:
Code:
'js'    =>      array('/text/','/javascript/')

Explaination:
Fileinfo PHP module cannot determine text types correctly, for some JavaScript files it gets values like 'text/c++', 'text/css' and so on.
But JavaScript files are text files so now you can just put '/text/' in $mimes array.

Extension page: xbsoft.org/codeigniter/.




Theme © iAndrew 2016 - Forum software by © MyBB