• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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/.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.