I can't seem to upload css file types in codeigniter I can't seem to upload css file types in codeigniter codeigniter codeigniter

I can't seem to upload css file types in codeigniter


I know, this is really weird but it worked for me:

in application/config/mimes.php, line 77

'css' => 'text/css',

change to:

'css' => array('text/css','text/x-c'),

To see, if your development environment has its own sense of humour and can add new mime types to any text files (my case), check your mimes like this:

if ( ! $this->upload->do_upload(-your-form-input-name-) ){                    print_r($_FILES['-your-form-input-name-']['type']);                    exit($this->upload->display_errors(). 'File Type: ' . $this->upload->file_type);                }

If an upload fails it will show you what mime type your server is actually getting to deal with.

PS. Now that there is an answer to your question, go here and help me :)