ZF-5744: Multible file uploads using the same $formname in setFileUpload

Issue Type: Bug Created: 2009-02-11T05:13:51.000+0000 Last Updated: 2011-07-29T18:50:48.000+0000 Status: Closed Fix version(s): - 1.11.10 (04/Aug/11)

Reporter: Marc Bennewitz (GIATA mbH) (mben) Assignee: Enrico Zimuel (zimuel) Tags: - Zend_Http_Client

Related issues: Attachments: - zhc.zf5744.patch


With the current file upload implementation I can't generate an multiple file upload using the same formname similar to example 1 on…

the following code will only upload the last file:

<pre class="highlight">
foreach ($files as $file) {
    $httpClient->setFileUpload($file, 'userfile[]');
$rs = $httpClient->request('POST');


Posted by Shahar Evron (shahar) on 2009-07-19T13:24:27.000+0000

A patch fixing this is attached, however a subtle BC breakage is introduced. Will apply after consulting with people at Zend.

Posted by Shahar Evron (shahar) on 2009-07-20T08:58:09.000+0000

Fixed and documented in CS-16822

Posted by Bart McLeod ( on 2011-07-17T20:04:02.000+0000

Currently, the unit test for this fix fails...

Posted by Enrico Zimuel (zimuel) on 2011-07-29T18:33:23.000+0000

The implementation of this feature is buggy. See the unit test.

Posted by Enrico Zimuel (zimuel) on 2011-07-29T18:37:20.000+0000

Solved in trunk (commit 24300)

Posted by Enrico Zimuel (zimuel) on 2011-07-29T18:50:48.000+0000

Solved in branches/release-1.11 (commit 24301)

Have you found an issue?

See the Overview section for more details.


© 2006-2021 by Zend by Perforce. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.