probably :) Sidney G B Ferreira Desenvolvedor Web
On Sat, Jul 4, 2009 at 22:19, jmaicher <julian.maic...@googlemail.com>wrote: > > That's weird .. it didn't work for me. Maybe because I don't use > Doctrine/Propel forms?! > > On 5 Jul., 02:12, Sid Ferreira <sid....@gmail.com> wrote: > > stereo interactive' solution > > > > Sidney G B Ferreira > > Desenvolvedor Web > > > > On Sat, Jul 4, 2009 at 20:53, jmaicher <julian.maic...@googlemail.com > >wrote: > > > > > > > > > What did you use in propel? > > > > > On 5 Jul., 01:47, Sid Ferreira <sid....@gmail.com> wrote: > > > > I used it in propel too > > > > > > Sidney G B Ferreira > > > > Desenvolvedor Web > > > > > > On Sat, Jul 4, 2009 at 20:13, jmaicher < > julian.maic...@googlemail.com > > > >wrote: > > > > > > > Hey! > > > > > > > I've been spending hours and hours to find a way to upload a file > in > > > > > an embedded form. But I couldn't find a solution yet. :-( > > > > > It seems to be a common bug and there is already a ticket (http:// > > > > > trac.symfony-project.org/ticket/6662). But I don't use doctrine > forms. > > > > > I tried everything, including the workaround on > > > > > > > > http://stereointeractive.com/blog/2008/12/23/symfony-12-upload-a-file. > > > .. > > > > > . > > > > > Unfortunately with no success. > > > > > > > Please, do you guys have any suggestions for me?! > > > > > > > Here is my form: > > > > > > > class JobForm extends sfForm > > > > > { > > > > > public function JobForm() > > > > > { > > > > > ... > > > > > $this->embedForm("step2", new JobForm_Step2()); > > > > > ... > > > > > } > > > > > } > > > > > > > class JobForm_Step2 extends sfForm > > > > > { > > > > > > > public function configure() > > > > > { > > > > > ... > > > > > > > $this->setWidget("image", new sfWidgetFormInputFile()); > > > > > > > # define validator for image > > > > > $configData = sfConfig::get("app_job_image"); > > > > > > > $this->setValidator("image", new sfValidatorFile(array( > > > > > "required" => false, > > > > > "path" => sfConfig::get('sf_upload_dir') . $configData > > > > > ['upload_dir'] , > > > > > "mime_types" => array('image/jpeg', 'image/jpg'), > > > > > "max_size" => $configData['max_size'] * 1024 > > > > > ), array( > > > > > "mime_types" => "Es werden nur Bilder im JPEG-Dateiformat > > > > > unterstützt", > > > > > "max_size" => "Dein ausgewähltes Bild ist zu groß (maximal > ". > > > > > $configData['max_size']." Kilobyte)" > > > > > ))); > > > > > ... > > > > > } > > > > > > > } > > > > > > > Here is my action: > > > > > ... > > > > > $this->form->bind($request->getParameter($this->form->getName()), > > > > > $request->getFiles($this->form->getName())); > > > > > ... > > > > > if(!$this->form['step2']['image']->hasError() && > is_object($this->form > > > > > ['step2']['image']->getValue())) > > > > > { > > > > > # upload > > > > > } > > > > > > > $this->form['step2']['image']->getValue() is always NULL. > Furthermore > > > > > $request->getFiles($this->form->getName()) is empty. How can that > be?? > > > > > The $_FILES array is not empty, so the files has been correctly > sent > > > > > to the server. > > > > > > > I could really need some help here! Thanks, > > > > > > > Julian > > > --~--~---------~--~----~------------~-------~--~----~ 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 symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---