2 Questions about Zend_File_Transfer:

1- What's the best way of renaming multiple files using Zend_File_Transfer?

I found the following example in the manual (
http://framework.zend.com/manual/1.9/en/zend.file.transfer.filters.html):

$upload->addFilter('Rename', 'C:\picture\newjpg', 'file1')
       ->addFilter('Rename', 'C:\picture\newgif', 'file2');

But it seems that it doesn't work since it sets the filter multiple times
using different options.

2- What should be used if there are some optional file fields?

Again, the 'Count' validator with 'min=1' and 'max' didn't work.

Eg. In the following example, it still expects 3 fields to be filled out
although I set the parameter 'min' to 1

$upload->setValidators(array(
    'Count' => array('min' => 1, 'max' => 3),
));

Reply via email to