File uploading error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: File uploading error (/showthread.php?tid=19140) |
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. 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(); |