Welcome Guest, Not a member yet? Register   Sign In
Error to uploading FLV
#1

[eluser]Asinox[/eluser]
Hi, im try to upload flv video, but i got a error about: The filetype you are attempting to upload is not allowed.

But i hav allowed the flv video...
Code:
function upload_video(){
    if ($this->validation->run() == FALSE){    
        $data['heading']=' >> Crear Articulo con Video';
        $data['querycat'] = $this->panel_model->listar_categorias();
        $data['querysub'] = $this->panel_model->listar_subcategorias();
        $data['page'] = $this->config->item('FAL_template_dir').'template_admin/panel/video_articulos_view';

    }else{
    
        $config['upload_path'] = './public/videos/';
        $config['allowed_types'] = 'flv';
        $config['max_size']    = '2048';
        /*$config['max_width']  = '1024';
        $config['max_height']  = '768'; */
        $config['overwrite']  = FALSE;
        $config['encrypt_name']  = TRUE;
        $config['remove_spaces']  = TRUE;        
        
        $this->load->library('upload', $config);
    
        if(!$this->upload->do_upload()){
            $data['error'] = array('error' => $this->upload->display_errors());
            $data['heading']=' >> Articulo Agregado';
            $data['querycat'] = $this->panel_model->listar_categorias();
            $data['querysub'] = $this->panel_model->listar_subcategorias();
            $data['page'] = $this->config->item('FAL_template_dir').'template_admin/panel/video_articulos_view';
            /*$this->load->vars($data);            
            $this->load->view($this->_container);*/

        }else{
            $this->articulos_model->procesar_video();
            $data['heading']=' >> Articulo Agregado';
            $data['page'] = $this->config->item('FAL_template_dir').'template_admin/panel/sucess_upload_view';
            /*$this->load->vars($data);            
            $this->load->view($this->_container);*/
        
        }
     }
         $this->load->vars($data);            
        $this->load->view($this->_container);
    }
#2

[eluser]Bramme[/eluser]
you have to set the mime type, not just "flv". I've seen a topic like this a little while ago, a little searching should dig it up...
#3

[eluser]Asinox[/eluser]
I did it Smile

thanks u




Theme © iAndrew 2016 - Forum software by © MyBB