Below is the code for my controller....
public function do_upload()
{
$config['upload_path']='./upload/';
$config['allowed_types']='gif|jpg|png';
$this->load->library('upload',$config);
$this->upload->do_upload('image_file');
if($this->upload->do_upload('image_file'))
{
$filedata = $this->upload->data();
$filename = $filedata['raw_name'].$filedata['file_ext'];
return $filename;
}
}
After this call this function where You want to make this upload...in controller
if($_FILES)
{
$this->do_upload();
}
but file is not uploaded.......why?