Zend Framework

Multible file uploads using the same $formname in setFileUpload

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.7.4
  • Fix Version/s: 1.11.10
  • Component/s: Zend_Http_Client
  • Labels:
    None

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/features.file-upload.multiple.php

the following code will only upload the last file:

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

Activity

Hide
Shahar Evron added a comment -

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

Show
Shahar Evron added a comment - A patch fixing this is attached, however a subtle BC breakage is introduced. Will apply after consulting with people at Zend.
Hide
Shahar Evron added a comment -

Fixed and documented in CS-16822

Show
Shahar Evron added a comment - Fixed and documented in CS-16822
Hide
Bart McLeod added a comment -

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

Show
Bart McLeod added a comment - Currently, the unit test for this fix fails...
Hide
Enrico Zimuel added a comment -

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

Show
Enrico Zimuel added a comment - The implementation of this feature is buggy. See the unit test.
Hide
Enrico Zimuel added a comment - - edited

Solved in trunk (commit 24300)

Show
Enrico Zimuel added a comment - - edited Solved in trunk (commit 24300)
Hide
Enrico Zimuel added a comment -

Solved in branches/release-1.11 (commit 24301)

Show
Enrico Zimuel added a comment - Solved in branches/release-1.11 (commit 24301)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: