Welcome Guest, Not a member yet? Register   Sign In
Upload library question
#1

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


Messages In This Thread
Upload library question - by El Forum - 05-07-2009, 07:55 AM
Upload library question - by El Forum - 05-07-2009, 10:34 AM
Upload library question - by El Forum - 05-07-2009, 10:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB