CodeIgniter Forums

Full Version: Error in uploading video
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

Hi friends,
I am having trouble in uploading video using CI, It's ok for me when I upload pictures but when I upload video, It shows the following error:
"The filetype you are attempting to upload is not allowed.".

Below is my code:

function do_upload()
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'flv|gif|jpg|png';
$config['max_size'] = '2048';
$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());

$this->load->view('upload_form', $error);
$data = array('upload_data' => $this->upload->data());

$this->load->view('upload_success', $data);

Please help.

El Forum

You need to add an entry to config/mimes.php for .flv