Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter: “The filetype you are attempting to upload is not allowed.”
#20

[eluser]skunkbad[/eluser]
[quote author="thecompleteprogrammer" date="1347692449"]Check the mime file name in your xampp/apache/conf/ folder
Check if it is 'mime' or 'mimes'
Now open the Upload.php file in your system/libraries folder in codeigniter
Go to line 949
Replace the file name 'mimes' to 'mime' as follows

public function mimes_types($mime)
{
global $mimes;

if (count($this->mimes) == 0)
{
if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mime.php'))
{
include(APPPATH.'config/'.ENVIRONMENT.'/mime.php');
}
elseif (is_file(APPPATH.'config/mime.php'))
{
include(APPPATH.'config//mime.php');
}
else
{
return FALSE;
}

$this->mimes = $mimes;
unset($mimes);
}

return ( ! isset($this->mimes[$mime])) ? FALSE : $this->mimes[$mime];
}
Now stop and restart xampp.....

Differences in the xampp and codeigniter versions or standards may be the problem. Hope this works.....;-)
[/quote]

This is no solution. The filename in application/config IS mimes.php, not mime.php. You should also properly extend the Upload class, and not make changes directly to core files.


Messages In This Thread
CodeIgniter: “The filetype you are attempting to upload is not allowed.” - by El Forum - 09-15-2012, 07:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB