Welcome Guest, Not a member yet? Register   Sign In
Upload Library Problem Help Please
#1

[eluser]Unknown[/eluser]
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

Code:
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 ' .
                $this->upload->display_errors();
        }

        
        return $data;
          
    }

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



PLEASE HELP I'm desperate




Theme © iAndrew 2016 - Forum software by © MyBB