> is there a way to not overwrite the field
> unless a new image is uploaded. essentially only activate the file
> upload if somebody adds a file otherwise it remains as it was?
It looks like all your controller does is manage the upload, so you
could simply check to see if that field is populated before saving it.
Otherwise (if there are more fields being updated, such as a whole
user profile) you can check if there is an image and if not unset()
that field.
Such as:
if(isset($this->data['Pic']['file']) && $this->data['Pic']['file'] ==
"") {
unset($this->data['Pic']['file']);
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---