[eluser]Pawel K[/eluser]
Hello, I am using $this->upload->data(); to get the full file path of the uploaded image. However, for some reason this returns the value without the .jpg extension. Any ideas on what could be going on?
Code:
#Perform Action
else
{
#Set Upload Options
$config_pic_up['upload_path'] = $this->config->item('cat_img_upload');
$config_pic_up['allowed_types'] = 'gif|jpg|png';
$config_pic_up['max_size'] = '3000';
$config_pic_up['max_width'] = '4024';
$config_pic_up['max_height'] = '3068';
$config_pic_up['file_name'] = now();
$this->load->library('upload', $config_pic_up);
$image_info = $this->upload->data();
$image_file_full = $image_info['full_path'];
echo $image_file_full;
chmod($image_file_full, 777);
#Post Data
$cat_name = $this->input->post('cat_name');
$cat_topcat = $this->input->post('category');
$cat_desc = $this->input->post('cat_desc');
In the above example the $image_info['full_path'] item displays:
/home/xxxxx/public_html/cart/images/category/1273687679
instead of the proper value:
/home/xxxxx/public_html/cart/images/category/1273687679.jpg
Any ideas would be appreciated.