CodeIgniter Forums
Upload Library Problem Help Please - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: Upload Library Problem Help Please (/thread-54787.html)

Upload Library Problem Help Please - El Forum - 09-25-2012

Hi I have a problem and need help ASAP.I used the upload library it but does not work because
it does not upload all file types.I specify the ones I want to enable as shown in the
tutorial. But it works for some and not for the others. I would add that this does not
always happen when my application was under development it never happened.Then I leave
the function I use to upload files

function _upload_file($folder)
        /*datos para la vista*/
        $data = array('scces' => true,'e_type' => '','e_det' => '');
        //camino a la carpeta de las sintesis
        $upload_path = 'files/tesis_maestria';        

        //configurando el proceso de uplod
        $config['upload_path'] = $upload_path;
        $config['allowed_types'] = 'docx|pdf|doc|zip|odt|rar';
        $config['file_name'] = $folder;
        $config['overwrite'] = true;
        $config['max_size'] = '0';      

        //cargando la libreria de uploads
        $this->load->library('upload', $config);

        if (!$this->upload->do_upload()) {
            $data['scces'] = false;
            $data['e_type'] = 'insertando';
            $data['e_det'] = 'No se han podido subir el documento de la tesis ' .

        return $data;

i test this function and it works for pdf and docx but not rar, zip and doc.

PLEASE HELP I'm desperate