CodeIgniter Forums
Error in uploading video - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: Error in uploading video (/thread-31478.html)



Error in uploading video - El Forum - 06-21-2010

[eluser]QUYET[/eluser]
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);
}
else
{
$data = array('upload_data' => $this->upload->data());

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

Please help.
Thanks...Quyet


Error in uploading video - El Forum - 06-21-2010

[eluser]danmontgomery[/eluser]
You need to add an entry to config/mimes.php for .flv