[eluser]LuckyFella73[/eluser]
Quote:but what i want to do is resize it before it does any of that
On PHP base you can't resize the image before uploading
(if its that what you meant)
What you can do is something like that:
Code:
// return "$filedata" like you have it now instead of "TRUE"
// or set a class property like $this->filedata in your upload function and pass it
$filedata = $this->_do_upload_file();
when calling the resize function.
if ($filedata !== FALSE){
$this->_resize_mood($filedata); // see provided code a few posts ago and edit format
}
In case you have your "_do_upload_file" function as a callback
as a form-validation rule just set up a new callback function
and fire the upload and resize function inside the callback.