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
-~----------~----~----~----~------~----~------~--~---

Reply via email to