Welcome Guest, Not a member yet? Register   Sign In
File uploading error
#1

[eluser]Unknown[/eluser]
Hello,

I have been trying to upload a file with following file uploading class: Please check this code

$config['upload_path'] = 'files/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '500';
$config['max_width'] = '500';
$config['max_height'] = '500';
$config['overwrite'] = TRUE;
$config['encrypt_name'] = TRUE;
$this->upload->initialize($config);

I have a problem with $config[‘encrypt_name’] -> the name of a file should be changed to some random string, but isn’t - it has still the original filename. Undecided

Thanks,
#2

[eluser]TheFuzzy0ne[/eluser]
Please show more of your code.

EDIT: Also, after you've initialised the library, please try this:

Code:
var_dump($this->upload->encrypt_name);
#3

[eluser]Evil Wizard[/eluser]
Following what TheFuzzy0ne said, just after I would do the following
Code:
$this->upload->do_upload();
var_dump($this->upload->data());
just to see what the upload class actually did with the file.




Theme © iAndrew 2016 - Forum software by © MyBB