Welcome Guest, Not a member yet? Register   Sign In
How to upload flv file in codeigniter
#1

[eluser]Unknown[/eluser]
I am unable to upload flv file in codeigniter.Please provide the solution for uploading flv file.Its very urgent for me.
#2

[eluser]Dam1an[/eluser]
What have you tried so far, and how does it fail? Error, blank screen?
#3

[eluser]sl3dg3hamm3r[/eluser]
You might face problems uploading big data through php itself. By default, a php-script won't run longer than 30 seconds. You might need to work with a java-applet which would open a ftp-connection to your server or something similar. With php alone, you won't become happy dealing with big files.
#4

[eluser]eoinmcg[/eluser]
The user guide is very good and comprehensive on this - and in general.

A quick checklist for troubleshooting:
Is your target directory writeable?
Code:
$config['upload_path'] = '/where/you/store/uploads/';

Is flv one the allowed filetypes?
Code:
$config['allowed_types'] = 'flv'

Is the file too big?
If you didn't set
Code:
$config['max_size']
it will default to the value in your php.ini

If none of the above work give us some more details on what is happening....
#5

[eluser]bluepicaso[/eluser]
m trying hte same but m getting ht error.
Quote:The filetype you are attempting to upload is not allowed.

my code is this
Code:
function upVideo()
    {
         $config['upload_path'] = "images/flickr";
        $config['allowed_types'] = "flv";
        $config['remove_spaces']= TRUE;
        $config['max_size'] = "122880";
        $this->load->library('upload', $config);
        
         if(!($this->upload->do_upload()))
        {//---showing custom error--------
                //echo $this->upload->display_errors();
                $data['response'] =$this->upload->display_errors();
                $data['response_image'] = 'error.png';
                $data['color']='red';
                $data['alt'] = "";
                $data['page'] = 'view_name';
                $this->load->view('ok', $data);
        }
        else
        {
            $finfo = $this->upload->data();
            //echo "<pre>";
            //print_r($value);
            //echo "</pre>";
            
            //--------the variable save the thumb file value for future use------------
            
            //echo $thumbnail."<br>";
            //echo $imagepath;
            
            //
            //echo "<pre>";
            //print_r($data);
            //echo "</pre>";
                $data['response'] ="image uploaded successfully";
                $data['response_image'] = 'error.png';
                $data['color']='red';
                $data['alt'] = "";
                $data['page'] = 'view_name';
                $this->load->view('ok', $data);
                
        }
    }

i have also included flv ion mimes
but its doesnt work
#6

[eluser]bluepicaso[/eluser]
go it!!!!

In mimes, instead of
Code:
'flv' => 'video/x-flv'

use
Code:
'flv' => 'video/flv'
thats is




Theme © iAndrew 2016 - Forum software by © MyBB