Holo,

reading the manual you may note that options have to be in array notation.
See http://framework.zend.com/manual/en/zend.form.elements.html#zend.form.elements.filters

and you may note that the rename filter expects a target.
See http://framework.zend.com/manual/en/zend.file.transfer.filters.html#zend.file.transfer.filters.rename

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com

----- Original Message ----- From: "holografix ." <[email protected]>
To: "Nabble Zend Framework General" <[email protected]>
Sent: Tuesday, July 14, 2009 7:09 PM
Subject: [fw-general] Rename file after upload


Hi

In my form I have a Zend_Form_Element_File like this:

$image = new Zend_Form_Element_File('Image');
$image->setLabel('Image')
              ->setDestination('c:/temp')
              ->addFilter('Rename', 'Art_1234')
              ->addValidator('Size', false, '1M')
              ->setMaxFileSize(1048576)
              ->setRequired(false);

The file is uploaded after $form->getValues() but with it's original name.
What is the problem with this ?

Thanks in advance.

Cheers
holo


Reply via email to