05-09-2011, 09:26 AM
[eluser]JasonS[/eluser]
Is anyone else having trouble uploading images with the file upload class?
When I set the allowed_types to * everything uploads fine. If I set it to gif|jpg|png it fails and logs the following error.
I have attached an image I have tried so far. I also downloaded today's Google logo and got the same error.. Any ideas?
Is anyone else having trouble uploading images with the file upload class?
Code:
if ($this->input->post('Upload')) {
$config['upload_path'] = getcwd().'/uploads';
$config['allowed_types'] = '*';
//$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '4000';
$config['max_width'] = '2048';
$config['max_height'] = '1536';
$this->load->library('upload', $config);
$this->upload->do_upload('Filedata');
die();
}
When I set the allowed_types to * everything uploads fine. If I set it to gif|jpg|png it fails and logs the following error.
Quote:ERROR - 2011-05-09 16:21:17 --> The filetype you are attempting to upload is not allowed.
I have attached an image I have tried so far. I also downloaded today's Google logo and got the same error.. Any ideas?