CodeIgniter Forums
.FLV file upload problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: .FLV file upload problem (/thread-5389.html)



.FLV file upload problem - El Forum - 01-20-2008

[eluser]Justin Patel[/eluser]
Hello friends,

I am trying to upload the flash file format, but it gives the error that this file format is not allowd.

please let me know, what can be the problem

Code:
$config['upload_path'] = './videos/';
                        $config['allowed_types'] = 'flv';
                        $config['max_size']    = '100000';
                        $config['max_width']  = '10000';
                        $config['max_height']  = '10000';
                        
                        $this->load->library('upload', $config);
                    
                        if ( ! $this->upload->do_upload())
                        {
                            $error = array('error' => $this->upload->display_errors());
                            print_r($error);
                        }    
                        else
                        {
                            $data = array('upload_data' => $this->upload->data());
                            print_r($data);
                        }



.FLV file upload problem - El Forum - 01-20-2008

[eluser]dawnerd[/eluser]
You need to add the flv mimetype to the mimes.php config file.

For example:
Code:
$mimes = array(
'hqx'=>'application/mac-binhex40',
'cpt'=>'application/mac-compactpro',
...
'flv'=>'video/x-flv'
);
Hope that helps you.


.FLV file upload problem - El Forum - 01-20-2008

[eluser]Justin Patel[/eluser]
[quote author="dawnerd" date="1200890423"]You need to add the flv mimetype to the mimes.php config file.

For example:
Code:
$mimes = array(
'hqx'=>'application/mac-binhex40',
'cpt'=>'application/mac-compactpro',
...
'flv'=>'video/x-flv'
);
Hope that helps you.[/quote]


Ohhh,

Thansk it works great ||||



Thanks for your help


.FLV file upload problem - El Forum - 01-21-2008

[eluser]Justin Patel[/eluser]
OPPS NEW PROBLEM,


IT WORKS FOR MY LOCAL HOST but not for the server

any help????????


.FLV file upload problem - El Forum - 01-21-2008

[eluser]dawnerd[/eluser]
Did you upload the modified mimes.php file? Does it give a different error than before?


.FLV file upload problem - El Forum - 01-21-2008

[eluser]Justin Patel[/eluser]
just the file you are trying to upload is not allowed


.FLV file upload problem - El Forum - 01-21-2008

[eluser]dawnerd[/eluser]
I would double check to make sure the mimes.php file is correct.


.FLV file upload problem - El Forum - 02-26-2008

[eluser]AlexC33[/eluser]
I add the same trouble.

corrected it by adding this line (in mimes.php) : 'flv' => 'application/octet-stream'

and it worked fine.


.FLV file upload problem - El Forum - 06-24-2008

[eluser]Zeeshan Rasool[/eluser]
guys , i have checked all these,but problem still going on. Tell me any other solu. thnx