[eluser]chefnelone[/eluser]
Hello
I'm using this code for uploading files. Works fine, but I'like to lowercase the file name before uploading the file.
Let's say the file name is: My_File.JPG change to my_file.jpg
(note that I need to lowercase the extension too)
How should I do that?
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '3000';
$config['max_width'] = '1200';
$config['max_height'] = '1200';
//I thought something like: strtolower()but don't know how to get the name of the file;
$this->load->library('upload', $config);
$this->upload->do_upload();