Picture uploading - 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: Picture uploading (/showthread.php?tid=9534) |
Picture uploading - El Forum - 06-28-2008 [eluser]stuffradio[/eluser] What can I use to upload pictures and give them unique file names when they're uploaded? Picture uploading - El Forum - 06-28-2008 [eluser]EEssam[/eluser] Check this: http://ellislab.com/codeigniter/user-guide/libraries/file_uploading.html Picture uploading - El Forum - 06-28-2008 [eluser]charlie spider[/eluser] here's my upload function from my current project: Code: function do_upload() i store the original image name in the database as well as the scrambled ( md5 + salted ) version. Then to display an image on the site i send the original filename to a script that retreives the scrambled filename from the database, then sends the headers and streams the image to the browser. From the site visitor's perspective, they never see the scrambled filename and therefore can't reference any hacker laced files they've uploaded. Picture uploading - El Forum - 07-28-2008 [eluser]Skippy[/eluser] Code: $config['overwrite'] = 'TRUE'; This should probably be TRUE (without the quotes). The docs say it's a boolean so if you actually submit a string (even if it's 'FALSE') it will still get evaluated to true. You probably didn't have any issues because you're going for true anyway. |