Issues

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

Description

With the current file upload implementation I can't generate an multiple file upload using the same formname similar to example 1 on http://php.net/manual/en/…

the following code will only upload the last file:

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

Comments

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 (mcleod@spaceweb.nl) 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.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

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

Contacts