Welcome Guest, Not a member yet? Register   Sign In
Cant upload a video file to folder
#1

[eluser]rad11[/eluser]
Hello i have a problem with uploading file to folder.

I added mimes

Code:
'mp4'   =>      'video/mp4',
                                'wmv'   =>      array('video/wmv', 'video/x-ms-wmv', 'flv-application/octet-stream', 'application/octet-stream'),
                                'flv'   =>      array('video/flv', 'video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),
                                'avi'   =>      'video/x-msvideo'

My controller

Code:
public function upload_videos(){

  $config['upload_path'] = './uploads/videos';
  $config['allowed_types'] = 'avi|flv|wmv|mpeg|mp3|mp4';
  $config['max_size'] = 0;
  $config['max_width']  = 0;
  $config['max_height']  = 0;
  
  
    $this->load->library('upload', $config);
    $this->upload->initialize($config);

if ( ! $this->upload->do_upload()){
    $error = array('error' => $this->upload->display_errors());
    $this->load->view('media/videos_view', $error);
}else{
    $this->session->set_flashdata('success', '<p  red; font-weight:bold; font-size:20px;">Upload successed!<p>');
    redirect('media_ctrl/videos_view');
}
    
}
}
And I changed upload_max_filesize.


When i submited i have error


Code:
You did not select a file to upload.
Please help me what is wrong with it Sad


Messages In This Thread
Cant upload a video file to folder - by El Forum - 12-01-2013, 12:16 PM
Cant upload a video file to folder - by El Forum - 12-02-2013, 08:21 AM
Cant upload a video file to folder - by El Forum - 12-02-2013, 09:46 AM
Cant upload a video file to folder - by El Forum - 12-02-2013, 11:08 AM
Cant upload a video file to folder - by El Forum - 12-02-2013, 11:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB