[eluser]Zorancho[/eluser]
I am doing it this way:
First i create a folder at the same level as the system folder, example: uploads
Then i initialize the library (in the controller) like in the user guide:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->load->library('upload', $config);
if($this->upload->do_upload('name_of_the_input_file_in_the_form'))
{
$picture = $this->upload->data();
rename('./uploads/'.$picture['file_name'], './uploads/new_name.'.$picture['file_ext']);
}
I hope this helps anyone, of course you can do more checking, but that's the beauty of the CI, it gives you pretty good basic start, so you can learn more php along the way