Welcome Guest, Not a member yet? Register   Sign In
Allow any file to be upload problem
#1

[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
#2

[eluser]xwero[/eluser]
make a upload config file with the file groups that are allowed and autoload it.
Code:
$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
Code:
$config['allowed_types'] = $this->config->item('upload_all');
#3

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

[eluser]xwero[/eluser]
If you do it without the uploading class yes, otherwise no. Or you could hack the upload library code.
#5

[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.

.....JAMZee
#6

[eluser]Bramme[/eluser]
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...
#7

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




Theme © iAndrew 2016 - Forum software by © MyBB