05-22-2012, 10:02 AM
[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:
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/.
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/.