[eluser]Exxon[/eluser]
I am in the process of creating a filemanager for fckeditor for my cms. But when I upload the images I get the error that image_height (As this would contain the height according to the documentation) is undefined !
I followed the example in the user guide
Code:
$config['upload_path'] = 'resources/api/website_files/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '2000';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$config['encrypt_name'] = true;
$config['overwrite'] = false;
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload('file')) { display errors here }
else {
$updata = $this->upload->data();
$idata = array(
'type' => 1 ,
'website' => $website ,
'user' => $this->websites->get_user_id($data) ,
'name' => $updata["orig_name"],
'filename' => $updata["file_name"],
'size' => $updata["file_size"],
'width' => (isset ($updata["image_width"])) ? $updata["image_width"] : 0,
'height' => (isset ($updata["image_heigth"])) ? $updata["image_heigth"] : 0,
'mime' => $updata["image_type"],
);
}
Thanks