Welcome Guest, Not a member yet? Register   Sign In
WMA, WMV file upload
#1

[eluser]yousuf_007sys[/eluser]
I am having problem uploading the sound file, please find below part of the codes i am using

Code:
function do_upload_sound(){
        $this->secure();
          $user = $this->session->userdata('username');
        $config['upload_path'] = './sound/';
        $config['allowed_types'] = 'mid|wav|mp3|wma|wmv';
        $config['max_size']    = '1000';
        $config['max_width']  = '1024';
        $config['max_height']  = '768';
        
        $this->load->library('upload', $config);
    
        if ( ! $this->upload->do_upload())
        {
            $error = array('error' => $this->upload->display_errors(),
                            'username'=>$user);
            
            $this->load->view('message_sound', $error);
        }    
        else
        {
            $data = array('upload_data' => $this->upload->data());
            $info=$this->upload->data();
            
            $this->load->model('Profile_model','',TRUE);
            $this->Profile_model->editSound($user, $info['file_name']);
    
            $this->loadProfile();
        }
    }


It gives the error "The file type is not supported though I already specified it"

Any help will be highly appreciated
#2

[eluser]slowgary[/eluser]
Check this post, I think it has your answer... http://ellislab.com/forums/viewthread/120370/




Theme © iAndrew 2016 - Forum software by © MyBB