[eluser]oliviermarian[/eluser]
Late reply, but may help someone else (I was looking fo this answer and found this post).
my working code:
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$config['encrypt_name'] = TRUE;
$this->load->library('upload', $config);
//try upload
if ( ! $this->upload->do_upload())
{
// error
$this->load->view('upload_form', $error);
}
// HERE IS THE POINT
$uploaded_data = $this->upload->data();
$file = $uploaded_data['file_name'];
hope this helps
Olivier.