[eluser]the_unforgiven[/eluser]
Hi guys,
I currently have this code which uploads fine to the server folder in the config but i need to resize it them place into thumbs folder with a unqiue name, so can someone adviose how and best way to do it based on my code please?
Code:
function _do_upload_file()
{
//upload path and config
$config['upload_path'] = './assets/uploads/userfiles/';
$config['allowed_types'] = 'png|jpg|gif|jpeg';
$config['max_size'] = '3000';
$this->load->library('upload', $config);
$this->upload->initialize($config);
if (!$this->upload->do_upload())
{
$this->form_validation->set_message('_do_upload_file', $this->upload->display_errors());
return FALSE;
}
else
{
$filedata = $this->upload->data();
$this->filename = $filedata['file_name'];
return TRUE;
}
}