r101423 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101422‎ | r101423 | r101424 >
Date:22:39, 31 October 2011
Author:raindrift
Status:ok
Tags:
Comment:
Fixed a bug where some versions of Chrome on Linux and FF seemed to be accessing the filename property of a File object using a different key, preventing uploads from working.
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mw.UploadWizardUploadInterface.js
@@ -284,7 +284,12 @@
285285 */
286286 getFilename: function() {
287287 if( this.providedFile && ! this.$fileInputCtrl.get(0).value ) { // default to the fileinput if it's defined.
288 - return this.providedFile.fileName;
 288+ if( this.providedFile.fileName ) {
 289+ return this.providedFile.fileName;
 290+ } else {
 291+ // this property has a different name in FF vs Chrome.
 292+ return this.providedFile.name;
 293+ }
289294 } else {
290295 return this.$fileInputCtrl.get(0).value;
291296 }

Status & tagging log