Update Image |
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=""){
> 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/libra...ading.html and try a simple code first.
If your change an image and want to create an updated image then you first need to save the orginal image.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(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.
Are you using form open and form close? Without those it will never return anything to the controller post data.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(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.
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; |
Welcome Guest, Not a member yet? Register Sign In |