Re: [symfony-users] How to delete uploaded images when deleting records

2009-12-24 Thread Alexandru-Emil Lupu
If you are using sf 1.3 or. 1.4, then you have postDelete hook in your propel sent via htc magic On Dec 24, 2009 4:48 AM, "Serkan Koyuncu" wrote: Hi, If you're using Doctrine, you can create public function postDelete($event) { @unlink(sfConfig::get('sf_upload_dir').'/immobili/origin

Re: [symfony-users] How to delete uploaded images when deleting records

2009-12-23 Thread Serkan Koyuncu
Hi, If you're using Doctrine, you can create public function postDelete($event) { @unlink(sfConfig::get('sf_upload_dir').'/immobili/original/'.$this->fotoPrincipale); @unlink(sfConfig::get('sf_upload_dir').'/immobili/big/'.$this->fotoPrincipale); } in your model

Re: [symfony-users] How to delete uploaded images when deleting records

2009-12-23 Thread Parijat Kalia
I did not go through your code, how are you storing images in the db, using file paths? On Wed, Dec 23, 2009 at 7:54 AM, ilcaduceo wrote: > Hi all, I've a simple form with sfFormWidgetInputFileEditable for > simple upload of photos: > > $this->validatorSchema['fotoPrincipale'] = new sfValidatorF

[symfony-users] How to delete uploaded images when deleting records

2009-12-23 Thread ilcaduceo
Hi all, I've a simple form with sfFormWidgetInputFileEditable for simple upload of photos: $this->validatorSchema['fotoPrincipale'] = new sfValidatorFile(array( 'required' => false, 'path' => sfConfig::get('sf_upload_dir').'/immobili/original',