Welcome Guest, Not a member yet? Register   Sign In
Multiple File uploading issue
#1

[eluser]saad06[/eluser]
Hi,
I am trying to use the multiple file upload library of codeigniter.The files are uploading fine but when i use validation on these file it does not give me the required results.Here is my code.

Code:
$filename=$_FILES['userfile']['name'];
        $config['file_name']=$filename;
        $config['upload_path'] = './news/';
        $config['allowed_types'] = 'doc|docx|pdf';
        $config['max_size'] = '2048';
        $config['remove_spaces']= TRUE;
        $this->load->library('upload',$config);//i think the issue is here
        $this->load->library('Multi_upload');
            
      
        $files = $this->multi_upload->go_upload();
        
        
        if(!$files)
        {
            
                    $data['invalid']=$this->upload->display_errors();
                    $login_user=$this->sessdata;
            $data['page_title']="Add news";
            $datas['user']=$login_user;
            $this->load->view('administrator/header',$datas);
            $this->load->view('administrator/add',$data);
            $this->load->view('administrator/footer');
        }
        else {
            
            
        }
Please help.Thanks in advance




Theme © iAndrew 2016 - Forum software by © MyBB