Hello, did you find a solution for this problem ??
thanks On 30 mar, 11:51, Manne <emanuel.winb...@gmail.com> wrote: > I'm using the PR9 and is having the same issue. > > The main "issue" is really that I can't find any documentation at all > on how to handle the submission of files through forms. > > Anyone that have found something to share on this topic? :-) > > I've got the form (with a FileField) to submit the file, but when I > try to do my processing on the file, I get an exception stating that I > probably missed the "enctype"-attribute. But when I add the > "enctype='multipart/form-data'" I get the exception that the variable > passed to the processing function of my controller is "null". > > Thanks in advance! > > On Feb 2, 11:44 pm, stfalcon <stepan.tanasiyc...@gmail.com> wrote: > > > I've not commited the code where I try tousethe attribute because it > > doesn't really make any difference. > > > Here is what I did: first I added enctype attribute to form in Project/ > > create.html.php and added theFileFieldelement to Application > > \PortfolioBundle\Form\Project in the configure() method: > > > $this->add(newFileField('image', array( > > 'secret' => md5('blablabla')))); > > > After that I added files data to $form->bind() in createAction() on > > ProjectController > > > $form->bind($this->get('request')->request->get($form->getName()), > > > $this->get('request')->files->get($form- > > > >getName())); > > > After that I created method setImage($image) in Project entity. But > > $image is null... I try debug and think thas problem in files params > > to bind. > > > Just one simple question with no connetion to my specific problem: can > > anyone confirm this functionality is actually working or were there > > any problems? Thanks! > > > On 2 Лют, 20:37, Gábor Fási <maerl...@gmail.com> wrote: > > > > Your form is missing the enctype attribute. > > > > On Wed, Feb 2, 2011 at 16:04, stfalcon <stepan.tanasiyc...@gmail.com> > > > wrote: > > > > In mysymfony2sampleprojecthttps://github.com/stfalcon/portfolioI > > > >needuploadscreenshots to projects. > > > > I tryuseFileFieldand debug him. But can't get it to work... > > > > > I found no examples or docs of itsuse. Somebody usedFileFieldin > > > > form tofileupload? It's working? > > > > > -- > > > > If you want to report a vulnerability issue on symfony, please send it > > > > to security at symfony-project.com > > > > > You received this message because you are subscribed to the Google > > > > Groups "symfony users" group. > > > > To post to this group, send email tosymfony-us...@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 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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