CodeIgniter Forums
please help upload file flv - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: please help upload file flv (/showthread.php?tid=31328)



please help upload file flv - El Forum - 06-15-2010

[eluser]jonny tran[/eluser]
Hi, please help
source:
function get_clip_add()
{

$order =$this->input->post('order');

/* upload image */
$config['upload_path'] = '../uploads/clip/';
$config['allowed_types'] = 'flv';
$config['max_size'] = '10000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$this->load->library('upload', $config);
if (!$this->upload->do_upload("image")) {
$error = array('error' => $this->upload->display_errors());
$this->session->set_userdata($error);
return false;
}
else{
$data = $this->upload->data();
$image = $data["file_name"];
}
/* end upload image */

$strquery = "insert into clip(`Clip_name`,`order`) values('$image', '$order')" ;
return $this->db->query($strquery);
}
I don't upload file flv (5M)
i config php.ini 10M
please help


please help upload file flv - El Forum - 06-15-2010

[eluser]Flemming[/eluser]
did you remember to set your form's enctype?

Code:
<form method="post" action="/" enctype="multipart/form-data">

or perhaps if you explain what exactly the problem is you may get more help here! Your question is a little unclear :-)