[eluser]Madtrooper[/eluser]
Hey guys!
I have another question
I'm trying to upload an image, and all works well (using the user guide - file uploading class). Except for 1 thing. I set the following config:
Code:
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '1024';
$config['max_width'] = '1024';
$config['max_height'] = '768';
And indeed, when I upload an image that is within these limits, it uploads the file to my upload folder. When it exceeds one or more of these limits, it does not get uploaded in the upload folder, awesome!
BUT :O
When I do the following:
Code:
if ( ! $this->upload->do_upload('screenshot'))
{
$error = array('error' => $this->upload->display_errors());
return $error;
}
else
{
$data = array('upload_data' => $this->upload->data());
return TRUE;
}
It always returns true... even when the file is too big & doesnt get uploaded, it still returns true. So I never know when an error has occured.
Any ideas? Is this a known bug? Or am I just being stupid?
Thanks!