I am creating a form for uploading a video file, but I have a strange error.
My form is as follows:
<div style="color : red;"><?php echo $error;?></div>
<?php echo form_open_multipart('data_center/ajout_ressource/formulaire_video'); ?>
//various input text fields...
<input type="file" name="video">
<input type="submit" value="Ajouter cette ressource" />
</form>±
My method to load (this is inside something to check if the whole form remains):
$dir = './assets/video/';
$config['upload_path'] = $dir;
$config['allowed_types'] = 'avi|flv|wmv|mpeg|mp3|mp4';
$config['max_size'] = '102400';
$this->load->library('upload',$config);
if ( ! $this->upload->do_upload('video')){
$error = array('error' => $this->upload->display_errors());
$this->load->view('data_center/ajout_video', $error);
} else {
redirect('data_center/data_center/','refresh');
}
As for the mime types, I think this is normal:
'mp4' => 'video/mp4',
'wmv' => array('video/wmv', 'video/x-ms-wmv', 'flv-application/octet-stream', 'application/octet-stream'),
'flv' => array('video/flv', 'video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),
'avi' => 'video/x-msvideo',
mp4, ( , ) , , , ( ).
, , , (, " , , " ), , .
, , php.ini, , (jpg, jpeg, png...), , , .mp4.
: FLV-, , , 8 ( ), 40 Mb FLV , mp4, php.ini 100mb