Issues

ZF2-327: The Upload validator might be broken

Description

Whatever I do I get no error nor object to work with. Other validators work as expected.

At the Zend\Validator\File\Upload the construct suppose to catch $_FILES in no file list was passed. Seems like it dont.


# from the form object

$this->add($factory->createElement(array(
    'name'  => 'resource_file',
    'attributes' => array(
        'label' => 'File:',
        'type'  => 'file',
    ),
)));

# from the filter (one of the variation I tried )

$this->add($factory->createInput(array(
    'name'       => 'resource_file',
    'required'   => true,
    'validators' => array(
        array(
            'name'      => 'File\Upload',
            'options'   => array (
                'files' => $_FILES,
            ),
            'files' => $_FILES,
        ),
    ),
)));

Comments

This issue has been closed on Jira and moved to GitHub for issue tracking. To continue following the resolution of this issues, please visit: https://github.com/zendframework/zf2/issues/2486