Revision: 55397
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 5, 2012 05:44 by pruntrut
Initial Code
function do_upload() {
$config = array(
'allowed_types' => 'jpg|jpeg|gif|png',
'upload_path' => $this->gallery_path,
'max_size' => 2000
);
$this->load->library('upload', $config);
$this->upload->do_upload();
$image_data = $this->upload->data();
$config = array(
'source_image' => $image_data['full_path'],
'new_image' => $this->gallery_path . '/thumbs',
'maintain_ration' => true,
'width' => 180,
'height' => 150
);
$this->load->library('image_lib', $config);
$this->image_lib->resize();
}
Initial URL
Initial Description
Initial Title
Upload and resize
Initial Tags
php, codeigniter
Initial Language
PHP