Welcome Guest, Not a member yet? Register   Sign In
Upload class won't upload .ico
#1

(This post was last modified: 12-18-2014, 01:45 PM by Razza.)

I'm trying to upload .ico files using the upload class, however, it returns 'The filetype you are attempting to upload is not allowed.' as the error.

I have updated the mimes.php file array with the following:
PHP Code:
'ico'   =>  array('image/ico''image/x-icon''application/ico''application/x-ico''application/x-win-bitmap''image/x-win-bitmap''application/octet-stream'), 

Here is my current code:
PHP Code:
$config['upload_path'] = 'files/';
$config['allowed_types'] = 'ico';
$config['max_size'] = '2000';
$config['max_width'] = '0';
$config['max_height'] = '0';
$this->load->library('upload'$config);
if (
$this->upload->do_upload('icon'))
{
 die(
'ok');
}
else
{
 die(
$this->upload->display_errors());


Any help is appreciated. Thank you.
Reply


Messages In This Thread
Upload class won't upload .ico - by Razza - 12-18-2014, 01:29 PM
RE: Upload class won't upload .ico - by Rufnex - 12-18-2014, 02:19 PM
RE: Upload class won't upload .ico - by Razza - 12-18-2014, 04:19 PM
RE: Upload class won't upload .ico - by Avenirer - 12-22-2014, 03:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB