[eluser]Zeeshan Rasool[/eluser]
if you are using multiple file broswers then you can access them with their name but you have to write separate code below provided to upload each file.i-e for uploading all files.
Code:
$config['max_size'] = '800000';
$config['upload_path'] = './path..';
$config['max_width'] = '1000';
$config['max_height'] = '1000';
$config['allowed_types'] = 'gif|jpg|jpeg|png|bmp';
Here below we are getting file name that are being uploaded and after that we will get extension type . like this...
Code:
$filename = basename($_FILES['image']['name']);
$Filename = explode('.',$filename);
$extension = $Filename[1];
$this->upload->initialize($config);
$this->load->library('upload', $config);
Now , give your own file name with extension that we have get. i-e
Code:
$this->upload->do_upload($image,'YOUR NAME HERE',$extension)
But you need little modification in Upload library function. Pass two param in do_upload func like this
Code:
function do_upload($field,$Name='',$Extension='')
/// ...
....
....
Change this
Code:
$this->file_name = $_FILES[$field]['name'];
TO
Code:
$this->file_name = (($Name=='') ? $_FILES[$field]['name'] : $Name );
So that if we provide our own name then it can be renamed. Otherwise not..
So Hows that?
Keep going
Cheers