• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Allow any file to be upload problem

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

I need to upload any file while uploading but, while upload using CI upload class we have to specify the allowed types,

How can I upload any type of file using CI upload class?

Plz help me

make a upload config file with the file groups that are allowed and autoload it.
$config['upload_img'] = '';
$config['upload_doc'] = '';
$config['upload_video'] = '';
$config['upload_audio'] = '';
$config['upload_all'] = $config['upload_audio'].'|'.$config['upload_video'].'|'.$config['upload_doc'].'|'.$config['upload_img'];
Add the types you want to allow for your site and where ever you need to upload you can do
$config['allowed_types'] = $this->config->item('upload_all');

[eluser]Justin Patel[/eluser]
can't we upload any file without specifying the file type ?

If you do it without the uploading class yes, otherwise no. Or you could hack the upload library code.

[eluser]Zeeshan Rasool[/eluser]
yar , i h've problem wd 'max size' of uploading video clip.
Error: The uploaded file exceeds the maximum allowed size in your PHP configuration file

where is the error loc.


That's a setting in your php.ini, unless you have access to your server, you'll have to contact your host and ask if they can up this. Standard it's 2Mb if I'm not mistaken...

[eluser]Zeeshan Rasool[/eluser]
Thnx , But im working on localhost.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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