![]() |
Renaming uploaded image.... - 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: Renaming uploaded image.... (/showthread.php?tid=26731) |
Renaming uploaded image.... - El Forum - 01-21-2010 [eluser]rich.a.coy[/eluser] I'm trying to rename an image that has been uploaded and resized so that it has the format of userid_thumb.xxx where userid is the sessions user_id. The code below gets it renamed properly in the database but the actual image still is getting the original files name plus '_thumb' Also, if someone could tell me where/how to unset the original image that would be great; I only want to store the generated thumbnail. Code: function doUpload() { Thanks in advance for your help! [edit] I got the renaming of the file to work by adding the following to the config settings: Code: $config['file_name'] = $this->session->userdata('user_id'); Still not sure how to unset the fullsize image to remove it from the directory. |