Any guess? I see that it doesn't matter if I set path in sfValidatorFile or if not, it still saves file twice. If I commen return statement in generateFilename() in sfValidatorFile.class.php, it helps. But this is not an elegant solution because we alter Symfony Core file which will be overwritten after symfony update.
On 22 Lut, 00:07, Tomasz Ignatiuk <[email protected]> wrote: > Hi > > I think there is a bug. The problem is the same as > here:http://forum.symfony-project.org/index.php/t/18847/ > When I use this (from documentation): > > $this->form->bind($request->getParameter('article'), > $request->getFiles('article')); > > if ($this->form->isValid()) > { > $file = $this->form->getValue('file'); > $filename = > 'my_filename'.$file->getExtension($file->getOriginalExtension()); > > $file->save(sfConfig::get('sf_upload_dir').'/'.$filename); > > $article = $this->form->save(); > > $this->redirect('article/edit?id='.$article->getId()); > } > > The file is saved twice on server. One time with my name and one time > with a name generated by symfony. Do you know why? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
