[symfony-users] How to change sf_upload_dir value

2010-01-03 Thread ilcaduceo
Hello, I'm using symfony 1.4 and I want to change the value of sf_upload_dir constant. Can I do it for example in a yaml file? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@googlegroups.com.

[symfony-users] Re: sfWidgetFormInputFileEditable no updating the file when edit

2009-12-30 Thread ilcaduceo
erride your delete method to: > > Public function delete(PropelPDO/ DoctrinePDO $con = null) > { >   @unlink($this->getFilePath()); >   Parent::delete($con); > > } > > Or appropriate to fix full path to the file, and also the appropriate db > adaptor. > Alecs >

[symfony-users] sfWidgetFormInputFileEditable no updating the file when edit

2009-12-29 Thread ilcaduceo
Hi all, I'm using the sfWidgetFormInputFileEditable for simple uploading of file in the filesystem and then storing name in the database associated with a model, but I noticed that when I'm editing/ deleting the model the old images remain in the filesystem... I want that when edit the image in the

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

2009-12-28 Thread ilcaduceo
toPrincipale); } but I think that $this->fotoPrincipale refers to the new values, how can i refer to the old values in the table? Thanks to all! On 28 Dic, 12:28, ilcaduceo wrote: > I try the code and it's correct! I understand that this method is in > the Doctrin

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

2009-12-28 Thread ilcaduceo
I try the code and it's correct! I understand that this method is in the Doctrine documentation, and also I found other useful methods... Thanks! On 24 Dic, 22:15, ilcaduceo wrote: > Yes i'm storing file paths in the database and the photos in the > filesystem... I'm using

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

2009-12-24 Thread ilcaduceo
; > �...@unlink(sfConfig::get('sf_upload_dir').'/immobili/original/'.$this->fotoPrincipale); > > @unlink(sfConfig::get('sf_upload_dir').'/immobili/big/'.$this->fotoPrincipale); >        } > > in your model file. > If you're using

[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',