malsup/form — Issue #160: Multiple file upload problems in FIrefox v9
Author: ronnyadsetts
Created: 2012-01-16 15:15:38+00:00
State: open

If you have a form with multiple file uploads but don't populate them all, only the populated entries are sent when using Firefox v9. From PHP on the server, we see the following in a test:

Firefox v9 sends this:

_FILES array (key=value):
name = 1327534_70300173_1200.jpg
type = image/jpeg
tmp_name = /tmp/phpUmeFec
error = 0
size = 210032

MSIEv8 (which works) sends this:

_FILES array (key=value):
name =
type =
tmp_name =
error = 4
size = 0
name = 1301078_77741818_1200.jpg
type = image/pjpeg
tmp_name = /tmp/phpjiZAla
error = 0
size = 146470

This obviously results in problems with the server script determining which file is for which form entry.

This problem first occurs in v2.90:
https://github.com/malsup/form/commit/254b2213c0b017ed2aed41fe98f00fd4d87c7654

The workaround for this is to use "iframe: true" in the Javascript for the form sumbit button.

Please let me know if you need any further information.

Regards,
Ronny