|Summary:||File info is not POSTed when an onsubmit handler is present on the form|
|Product:||WebKit||Reporter:||Seth Fitzsimmons <seth>|
|OS:||OS X 10.4|
Description Seth Fitzsimmons 2006-04-25 06:27:51 PDT
Adding a onsubmit handler to a multipart form with a file input causes the file to not be POSTed to the server.
Comment 1 Seth Fitzsimmons 2006-04-25 06:28:29 PDT
Created attachment 7956 [details] Upload form containing onsubmit
Comment 2 Seth Fitzsimmons 2006-04-25 06:29:06 PDT
Created attachment 7957 [details] PHP script demonstrating the absence of the "file" property
Comment 3 Alexey Proskuryakov 2006-04-25 10:20:19 PDT
I have tried removing the onsubmit handler, and the output from the script didn't change ("Array ( [title] => sometitle )"). Furthermore, it's the same in Firefox. Could you please clarify how to reproduce the problem?
Comment 4 Seth Fitzsimmons 2006-04-25 10:30:52 PDT
Er, sorry. I need to provide a better reduction.
Comment 5 Seth Fitzsimmons 2006-04-25 10:32:28 PDT
Created attachment 7960 [details] Better diagnostic script
Comment 6 Alexey Proskuryakov 2006-04-25 10:52:45 PDT
The updated script works as expected for me (i.e., I cannot reproduce the bug): Request: Array ( [title] => sometitle ) Files: Array ( [file] => Array ( [name] => onsubmit.php [type] => text/php [tmp_name] => /var/tmp/php7ISaZd [error] => 0 [size] => 124 ) ) I'm using Mac OS X 10.4.5 with Apache, accessing it locally.
Comment 7 Seth Fitzsimmons 2006-04-25 11:34:49 PDT
That's correct; I need to track down the problem more fully when I have some more time; in the meantime I figured I should make the diagnostic script clear that it _is_ working this way.
Comment 8 Seth Fitzsimmons 2006-04-25 19:31:01 PDT
Created attachment 7966 [details] Upload form containing onsubmit
Comment 9 Seth Fitzsimmons 2006-04-25 19:33:09 PDT
Upon further investigation, this only happens if the form being submitted has its visibility set to "none" (demonstrated in attachment 7966 [details]).