Am using below code, I have added a maximum size, but it uploads only 1 or 2 mb videos, if i upload a 55 MB video, it takes long to process but shows a result as blank page:
if (isset($_FILES['video']['name']) && $_FILES['video']['name'] != '') {
unset($config);
$date = date("ymd");
$configVideo['upload_path'] = './videos';
$configVideo['max_size'] = '602400000';
$configVideo['allowed_types'] = 'mp4|avi|flv|wmv|';
$configVideo['overwrite'] = FALSE;
$configVideo['remove_spaces'] = TRUE;
$video_name = $date.$_FILES['video']['name'];
$configVideo['file_name'] = $video_name;
$this->load->library('upload', $configVideo);
$this->upload->initialize($configVideo);
if (!$this->upload->do_upload('video')) {
echo $this->upload->display_errors();
} else {
$videoDetails = $this->upload->data();
$schdate = $this->input->post('scheduledate');
$schdesc = $this->input->post('scheduledes');
$user = '1';
$data = array(
'name' =>$configVideo['file_name'],
'date' => $schdate,
'description' => $schdesc,
'user_id' => $user
);
$this->db->insert('ch_schedule', $data);
echo "Successfully Uploaded";
}
}