CodeIgniter Forums
File uploading error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: File uploading error (/thread-19140.html)



File uploading error - El Forum - 05-29-2009

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


File uploading error - El Forum - 05-29-2009

[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);



File uploading error - El Forum - 05-29-2009

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