• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
adding flv mimes disables the format filter

#1
[eluser]Unknown[/eluser]
1.At first the flv upload is not allowed.
2.So i added the mime type.

the entry i added in mime
Code:
'flv'    => array('video/flv', 'video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),

3.This actually started uploading flv..but all the other file formats where also being uploaded no matter what the file is.

this is part of the code
Code:
upload code:
function upload_process()
    {
        
        //upload settings
        $config['upload_path'] = './videos/';
        $config['allowed_types'] = 'flv';
        $config['max_size']    = '200000';
        $config['encrypt_name']  = TRUE;
        $this->load->library('upload', $config);
        
        if ( ! $this->upload->do_upload())
        {
            $error = array('error' => $this->upload->display_errors());
            print_r($error);
        }    
        else
        {            
    ///after codes            
        }

#2
[eluser]foetus[/eluser]
I got the same proble too. anybody?

#3
[eluser]charlie spider[/eluser]
same problem

#4
[eluser]foetus[/eluser]
I did what exphobian says above:

Code:
'avi'    =>    array('video/x-msvideo', 'video/avi'),
                'flv'    =>    array('video/flv', 'video/x-flv', 'flv-application/octet-stream', 'application/octet-stream'),

And it works for me, I got the Version 1.7.

#5
[eluser]charlie spider[/eluser]
yes that will allow you to upload .flv files, ( actually the only thing that makes it work is adding 'application/octet-stream' to your mimes.php ) but the problem is that this will also allow you to upload any other type of file, like .php or .exe, or all kinds of fun stuff.

i added

Code:
if ( $filedata['file_ext'] == '.flv' )
{
--upload code here--
}
and made sure to add

Code:
unlink($filedata['full_path']);

in all appropriate locations after renaming the file and saving the info in the database.

#6
[eluser]foetus[/eluser]
Yes, you are right, maybe this a code igniter problem..

#7
[eluser]dimethroxy[/eluser]
I experienced a similar problem: here

Is there any fix? This is a serious problem..

#8
[eluser]deepydee[/eluser]
allow, how to set mimestype 3gp??


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.