problems with thumb creation - 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: problems with thumb creation (/showthread.php?tid=39381) |
problems with thumb creation - El Forum - 03-09-2011 [eluser]ebuoe[/eluser] hello ,i intend to upload images and also create a thumb and move to the thumb folder at 1nce ,then relocate back to the home page ,everything seems to be work ecepte the thumb creation,and also moving it $data['error'] = ""; $dir = "./images/uploads"; $new = "./images/uploads/thumbs"; $config['file_name'] = $user_id; $config['upload_path'] = $dir; $config['allowed_types'] = 'gif|jpg|png'; $config['max_size'] = '5000'; $config['max_width'] = '1000'; $config['max_height'] = '2000'; $this->load->library('upload', $config); if ( ! $this->upload->do_upload()) { $data['error'] = $this->upload->display_errors(); $this->load->view("c_user/i_craft_set_avatar",$data); } else { $data = array('upload_data' => $this->upload->data()); $config['image_library'] = 'gd2'; $config['source_image'] = $dir; $config['new_image'] = $new; $config['create_thumb'] = TRUE; $config['maintain_ratio'] = TRUE; $config['width'] = 75; $config['height'] = 50; $this->load->library('image_lib', $config); $this->image_lib->resize(); redirect('home','location'); thanks for your help |