[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