[eluser]ojcarga[/eluser]
I have worked uploading files just once but maybe this can help.
I used this to create my inputs (VIEW FILE)
Code:
$cfile=array('name'=>'fileup', 'id'=>'fileup', 'value'=>'File');
echo form_upload($cfile);
My Controller
Code:
function upload_psd() {
if(!ini_get('safe_mode')) {
set_time_limit(240);
ini_set('max_execution_time',0);
ini_set('memory_limit', '32M');
ini_set('upload_max_filesize', '35M');
ini_set('post_max_size', '35M');
ini_set('max_input_time', 900);
}
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'zip|jpg';
$config['max_size'] = '35840';
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload("fileup")){
//$error = array('error' => $this->upload->display_errors());
//echo '<p>NO SUBIO NI PICHA</p><br />';
return false;
}else{
//$data = array('upload_data' => $this->upload->data());
//echo '<p>SI se subio muy bien</p><br />';
return true;
}
}
I had to add the ini_set directives cause my server did not let me uploads anything, maybe you don't need them.