Bug in File Upload Class? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Bug in File Upload Class? (/showthread.php?tid=482) |
Bug in File Upload Class? - Stefan57 - 12-09-2014 I'm trying to upload a file and overwrite if exists on server but I always get error msg like: "File exists, overwrite is FALSE, could not save over file ./uploads/avatars/1.jpg" Here is my code where 'overwrite' is TRUE... Any idea how to solve this? Code: if( isset($_FILES['userfile']['name']) ) { RE: Bug in File Upload Class? - Avenirer - 12-09-2014 (12-09-2014, 06:33 AM)Stefan57 Wrote: I'm trying to upload a file and overwrite if exists on server but I always get error msg like: Make sure the folder and files are writable. RE: Bug in File Upload Class? - Stefan57 - 12-09-2014 (12-09-2014, 07:42 AM)Avenirer Wrote: Make sure the folder and files are writable. Folders/Files are writeable and upload works fine first time, but if I re-upload and need to write over previous file, I get this error: "File exists, overwrite is FALSE, could not save over file ./uploads/avatars/temp/1.png" Even I have this set in config: $config['overwrite'] = true; If it matter I run this under WAMP in my Win7 computer ... have not tried on real server yet ... Any ideas how to make upload / overwrite work ???? /Stefan RE: Bug in File Upload Class? - Stefan57 - 12-09-2014 I found the problem so you can ignore this thread! The problem was NOT with codeigniters File Upload Class It was in the Image_moo class, where I also had to set overwrite to TRUE /Stefan57 |