ZF-4634: Zend_Form_Element_File - setMultiFile does not work
Description
If I want to use setMultiFile, it does not work -> error message: The file 'upload_file' was illegal uploaded, possible attack.
I think, that the problem is with the $_FILES to files-array conversion.
$_FILES:
array(1) {
["upload_file"] => array(5) {
["name"] => array(2) {
[0] => string(23) "zend_framework_logo.jpg"
[1] => string(23) "zend_framework_logo.png"
}
["type"] => array(2) {
[0] => string(10) "image/jpeg"
[1] => string(9) "image/png"
}
["tmp_name"] => array(2) {
[0] => string(23) "I:\xampp\tmp\php388.tmp"
[1] => string(23) "I:\xampp\tmp\php389.tmp"
}
["error"] => array(2) {
[0] => int(0)
[1] => int(0)
}
["size"] => array(2) {
[0] => int(4353)
[1] => int(25524)
}
}
}
converted array:
array(1) {
["upload_file"] => array(2) {
["destination"] => string(30) "I:\xampp\htdocs\webexpo\upload"
["validators"] => array(0) {
}
}
}
Comments
Posted by Thomas Weidner (thomas) on 2008-10-18T07:46:38.000+0000
Please give reproducable code.
How the files are known internally has nothing to do with multifile. And the "converted array" does not show the internals of the file component.
Posted by Thomas Weidner (thomas) on 2008-10-21T14:57:09.000+0000
Probably fixed with r12068. If we get no response until 23.10 we will close this issue as fixed.
Posted by Martin Hujer (mhujer) on 2008-10-22T08:49:15.000+0000
Sorry, I didn't have time to reply earlier.
Problem happens when I have multifile element set as required.
Code for reproduction:
Posted by Thomas Weidner (thomas) on 2008-10-22T12:20:29.000+0000
Solved with r12082.
Just to mention: There were also notices returned which have had helped in solving this issue faster. Background: addValidator was not able to handle multifiles.
Posted by Wil Sinclair (wil) on 2008-11-13T14:10:27.000+0000
Changing issues in preparation for the 1.7.0 release.