the form is generated as enctype="multipart/form-data" ? alecs On Mon, Feb 16, 2009 at 2:13 PM, juro <[email protected]> wrote: > > I have tried that. $_POST has all the data (also the filenames) but > $_FILES is empty. > > Any ideas, why? > > juro > > On Feb 16, 10:24 am, Lupu Alexandru-Emil <[email protected]> wrote: >> personally i would do a >> print_r($_POST); >> print_r($_FILES); >> die(); >> in the lowest level of your app ... (a filter, a preexecute statement etc) >> >> On Mon, Feb 16, 2009 at 12:11 AM, Iltar <[email protected]> wrote: >> >> > As far as i know, you should use: file[] in your html. This creates an >> > array in $_FILES. >> >> > On Feb 15, 10:55 pm, juro <[email protected]> wrote: >> > > Hi, >> > > I am generating a form that has 5 file uploads and a few fields. When >> > > submitted (and valid), it should take the files, resize them and save >> > > them in a folder. >> >> > > This was working fine with one file, but I cannot get it to work with >> > > 5 ... even $_FILES is empty. >> >> > > class MultipleImageForm extends sfForm >> > > { >> > > public function configure() >> > > { >> > > $this->setWidgets(array( >> > > 'caption' => new sfWidgetFormTextarea(), >> > > )); >> >> > > $this->widgetSchema['caption']->setLabel('Caption'); >> >> > > $this->setValidators(array( >> > > 'caption' => new sfValidatorString(array('max_length' >> > > => 2147483647, 'required' => false)), >> > > )); >> >> > > $files = new sfForm(); >> > > for ($i=0; $i<5; $i++) >> > > { >> > > $files->widgetSchema['file_' . $i] = new sfWidgetFormInputFile >> > > (array('label' => 'Bild ' . ($i + 1)), array('name' => 'upfile_' . >> > > $i)); >> > > } >> > > $this->embedForm('files', $files); >> >> > > $this->widgetSchema->setNameFormat('images[%s]'); >> > > } >> >> > > } >> >> > > In my action, all I do is echo out the $_FILES and the >> > > $request->getFiles($this->form->getName()) but both are null. I would >> > > like to >> >> > > put the resize functionality into the MultipleImageForm's bind method >> > > but again, $taintedFiles is empty. >> >> > > Any recommendations? >> >> > > juro > > >
--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
