![]() |
Update Image - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: Update Image (/showthread.php?tid=80477) |
Update Image - pou_to_ksereis - 11-06-2021 Hey friend i cannot update the user image. it overwrites the old image. please any hint regarding this problem? thanks ![]() PHP Code: public function edit($id=""){ RE: Update Image - kenjis - 11-13-2021 > i cannot update the user image. it overwrites the old image. If the old image is overwritten, it seems you can update the user image. I don't get what you say correctly. See https://codeigniter.com/userguide3/libraries/file_uploading.html and try a simple code first. RE: Update Image - InsiteFX - 11-13-2021 If your change an image and want to create an updated image then you first need to save the orginal image. RE: Update Image - pou_to_ksereis - 11-15-2021 (11-13-2021, 01:44 AM)InsiteFX Wrote: If your change an image and want to create an updated image then you first need to save the orginal image. RE: Update Image - InsiteFX - 11-15-2021 Are you using form open and form close? Without those it will never return anything to the controller post data. RE: Update Image - pou_to_ksereis - 11-15-2021 (11-15-2021, 02:33 AM)InsiteFX Wrote: Are you using form open and form close? Without those it will never return anything to the controller post data. RE: Update Image - kenjis - 11-19-2021 https://codeigniter.com/userguide3/libraries/file_uploading.html#preferences The default value of overwrite is false. RE: Update Image - pou_to_ksereis - 11-23-2021 Still no result, I added $config['overwrite'] = false; as @kenjis say but still the first image is displayed even after the replace ![]() if ($_FILES['image_thumb']['name']) { $config['upload_path'] = './uploads/product_image/'; $config['allowed_types'] = 'gif|jpg|png|jpeg|JPEG|GIF|JPG|PNG'; $config['max_size'] = "1024"; $config['max_width'] = "*"; $config['max_height'] = "*"; $config['encrypt_name'] = TRUE; $config['overwrite'] = false; |