[eluser]himalking[/eluser]
[quote author="Madmartigan1" date="1292424785"]If you're using CI 2.0, you can use "*" to allow all types.
If you aren't you could read the keys of the mimetypes in your config/mimetypes.php and implode('|', $the_array_keys)[/quote]
what is CI 2.0, do you mean v 2.0 !!
the current version is 1.7.2.
any way I have tweaked the current codeigniter Upload.php library to allow the "*" to upload all file types, here it is if someone is interested:
1- in "system/libraries/Upload.php" search for
Code:
function is_allowed_filetype($ignore_mime = FALSE){
2- add the following code at the beginning of the function
Code:
if($this->allowed_types[0] == '*')
{
return true;
}
I know it's not right to edit the core file system, so can someone advice me how to implement this without modding the file system.
some might say be extending the upload.php, but actually I don't know how to make it