jenkins-bot has submitted this change and it was merged.

Change subject: Normalize file extension for uploaded files
......................................................................


Normalize file extension for uploaded files

The extension is made lowercase and, in case an extension has several
possible variants, turned into an arbitrarily chosen common form
(in particular, this changes jpeg->jpg, tiff->tif, ogv->ogg).

Bug: T36703
Change-Id: I315bc67d30f8b8754632a8c0bf810086f2d77b35
---
M resources/mw.UploadWizardDetails.js
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  MarkTraceur: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/mw.UploadWizardDetails.js 
b/resources/mw.UploadWizardDetails.js
index dcf8c90..143c468 100644
--- a/resources/mw.UploadWizardDetails.js
+++ b/resources/mw.UploadWizardDetails.js
@@ -46,7 +46,8 @@
                this.mainFields.push( this.descriptionsDetailsField );
 
                this.titleDetails = new uw.TitleDetailsWidget( {
-                       extension: this.upload.title.getExtension()
+                       // Normalize file extension, e.g. 'JPEG' to 'jpg'
+                       extension: mw.Title.normalizeExtension( 
this.upload.title.getExtension() )
                } );
                this.titleDetailsField = new uw.FieldLayout( this.titleDetails, 
{
                        label: mw.message( 'mwe-upwiz-title' ).text(),

-- 
To view, visit https://gerrit.wikimedia.org/r/289136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I315bc67d30f8b8754632a8c0bf810086f2d77b35
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: Bartosz Dziewoński <matma....@gmail.com>
Gerrit-Reviewer: MarkTraceur <mtrac...@member.fsf.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to