I've been stuck trying to upload a file in a module I am buidling.
I've tried using the EE instance and now I am trying the CI instance.
I've checked permission settings and those are fine for the directory I am trying to upload to.
I set the form type to use the form_open_multipart
Here is my upload function that does not want to work:
function upload_file()
{
$this->CI =& get_instance();
$file = $this->EE->input->post('userfile');
$config['upload_path'] = './images/';
$config['allowed_types'] = 'gif|jpg|png';
$this->CI->load->library('upload', $config);
if ( ! $this->CI->upload->do_upload($file) )
print 'could not upload file';
}