Index: trunk/extensions/UploadWizard/resources/mw.UploadWizard.js |
— | — | @@ -356,7 +356,8 @@ |
357 | 357 | // which works as a file input. It will be set to opacity:0 and then we can do whatever we want with |
358 | 358 | // interface "below". |
359 | 359 | // XXX caution -- if the add file input changes size we won't match, unless we add some sort of event to catch this. |
360 | | - _this.form = $j('<form class="mwe-upwiz-form"></form>') |
| 360 | + _this.form = $j( '<form method="POST" encType="multipart/form-data" class="mwe-upwiz-form"></form>' ) |
| 361 | + .attr( { action: _this.upload.api.url } ) |
361 | 362 | .append( visibleFilenameDiv ) |
362 | 363 | .append( _this.fileCtrlContainer |
363 | 364 | .append( _this.$fileInputCtrl ) |
Index: trunk/extensions/UploadWizard/resources/mw.ApiUploadHandler.js |
— | — | @@ -41,20 +41,6 @@ |
42 | 42 | var _this = this; |
43 | 43 | mw.log( "configuring form for Upload API" ); |
44 | 44 | |
45 | | - // Set the form action |
46 | | - try { |
47 | | - this.$form.attr( { |
48 | | - action: _this.api.url, |
49 | | - method: 'POST', |
50 | | - encType: 'multipart/form-data' |
51 | | - } ); |
52 | | - } catch ( e ) { |
53 | | - alert( "oops, form modification didn't work in ApiUploadHandler" ); |
54 | | - mw.log( "IE for some reason error's out when you change the action" ); |
55 | | - // well, if IE fucks this up perhaps we should do something to make sure it writes correctly |
56 | | - // from the outset? |
57 | | - } |
58 | | - |
59 | 45 | _this.addFormInputIfMissing( 'action', 'upload' ); |
60 | 46 | |
61 | 47 | // force stash |
Index: trunk/extensions/UploadWizard/resources/mw.Log.js |
— | — | @@ -25,6 +25,7 @@ |
26 | 26 | if ( typeof window.console !== 'undefined' && typeof window.console.log === 'function' ) { |
27 | 27 | window.console.log( s ); |
28 | 28 | } else { |
| 29 | +/* |
29 | 30 | // Show a log box for console-less browsers |
30 | 31 | var $log = $( '#mw-log-console' ); |
31 | 32 | if ( !$log.length ) { |
— | — | @@ -53,6 +54,7 @@ |
54 | 55 | } ) |
55 | 56 | .text( s ) |
56 | 57 | ); |
| 58 | +*/ |
57 | 59 | } |
58 | 60 | }; |
59 | 61 | |