$config[\'upload_path\'] = site_path().\'photos/\';
$config[\'allowed_types\'] = \'gif|jpg|png|jpeg\';
$config[\'max_size\'] = \'2048\';
$this->load->library(\
Try out this code in your Controller
$config['upload_path'] = 'images'; //name of the uploading folder
$config['allowed_types'] = 'jpeg|png|jpg';
$config['file_name'] = 'name_for_file';
$this->load->library('upload', $config);
$this->upload->initialize($config);
if (!$this->upload->do_upload())
{
echo $this->upload->display_errors();
exit;
}
else
{
$upload_data = $this->upload->data();
}