[eluser]i_am_using_ci[/eluser]
Hi, I am using Upload class in my applicaiton and got interesting situation:
I want all files being uploaded to my server has encrypted names, so I am doing:
Code:
...
$config['encrypt_name'] = true;
$this->load->library('upload', $config);
...
But file names were not modified, I've started making some checks, my config was correct and option was passed correctly, but there is code in Libraries/Upload.php:
Code:
if ($this->overwrite == FALSE)
{
$this->file_name = $this->set_filename($this->upload_path, $this->file_name);
if ($this->file_name === FALSE)
{
return FALSE;
}
}
It says that if I set $config['overwrite'] to 'false' it will make names encrypted, otherwise none...
I can't understand that logic, where is connection between 'overwrite' and 'encrypt_name', who could explain why it's so?