I have a form for propel object. It has an avatar field, which is a path to its file. It works great, but I dont want this field to be updated, when I'm not upload file. Currently it overwrites old value with an empy record.
Can anybody tell me what can I do about this? P.S. Im handling file upload in actions.php according to the manual $this->form->bind($requestFormData, $request->getFiles('profile')); if ($this->form->isValid()) { $file = $this->form->getValue('avatar'); if (!is_null($file)){ $filename = 'uploaded_'.sha1($file->getOriginalName()); $extension = $file->getExtension($file->getOriginalExtension()); $file->save(sfConfig::get('sf_upload_dir').'/'.$filename.$extension); }else{ } $profile = $this->form->save(); } -- ============================ Regards... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---