I am having a problem with a callback.
$crud->columns('description','slideshow','price','address_number', 'address_street', 'address_city', 'address_province', 'address_country', 'address_postal' , 'contact_name', 'contact_email', 'contact_home_phone', 'contact_cell_phone', 'contact_form_email');
$crud->set_field_upload('slideshow','assets/uploads/files');
$crud->unset_back_to_list();
$crud->callback_after_upload(array($this,'example_callback_after_upload'));
$output = $crud->render();
$this->_example_output($output);
function example_callback_after_upload($uploader_response,$field_info, $files_to_upload)
{
$this->load->library('image_moo');
//Is only one file uploaded so it ok to use it with $uploader_response[0].
$file_uploaded = $field_info->upload_path.'/'.$uploader_response[0]->name;
$this->image_moo->load($file_uploaded)->resize(800,600)->save($file_uploaded,true);
return true;
}
This example comes right out of the documentation (http://www.grocerycr...ck_after_upload ), but I can't get it working. I have checked and the file is being uploaded to the correct folder on my server.
Can anyone see what I'm doing wrong? The callback appears to be ignored.
Thanks in advance,
B