Welcome Guest, Not a member yet? Register   Sign In
Video Upload Problem
#1

[eluser]Nehiryeli[/eluser]
Hello, i'm having trouble when i uploading video files. Everyting works fine for jpg, mp3 but i cant upload video files (i tried mp4 and avi).
it says "You did not select a file to upload."
i'm working in locahost (wamp) and changed max_upload size limit in php.ini, my config array is like so
$config = array('allowed_types'=>'avi|mp4|fla|mp3','upload_path' => './videos/');.
i'm not sure what the problem is. Is it be about mimes.php?
#2

[eluser]vincej[/eluser]
It would help us if you posted your controller and model. tks
#3

[eluser]Nehiryeli[/eluser]
i increased the post_max_size in php.ini and problem solved. but now it gives "The filetype you are attempting to upload is not allowed" error.
the controller
Code:
$this->load->model('video_upload_model');
  $data=($this->video_upload_model->do_upload());

  echo ("<pre>");
  print_r($data);
model
Code:
$config = array(
   'allowed_types' => 'avi|mp4|fla|mp3',
   'upload_path' => './videos/'
  
  
  );

  $this->load->library('upload', $config);
  if($this->upload->do_upload())
  return $this->upload->data();
  else
  return $this->upload->display_errors();
#4

[eluser]Nehiryeli[/eluser]
As i suspected. it's mimes.php issue.
i added
Code:
'mp4' => 'video/mp4',
to mimes.php
and it worked Smile




Theme © iAndrew 2016 - Forum software by © MyBB