CodeIgniter Forums
Multiple File uploading issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Multiple File uploading issue (/showthread.php?tid=41475)



Multiple File uploading issue - El Forum - 05-09-2011

[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