From 702490c1695ba4e62b2582194caf347b486c950d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 12 Oct 2011 22:46:31 +0000 Subject: [PATCH] Temporarily disable pre-upload SVG thumbnailing in Special:Upload and Special:UploadWizard; workaround for worst part so far of bug 31643: some SVG files hanging Firefox during pre-upload thumbnail generation. It's possible that this isn't SVG-specific though; large JPEGs are so far known to take a couple seconds and still pause the browser UI, but some SVGs hang Firefox 7/8/9 indefinitely when loaded as a data URI. Upstream Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=694165 --- resources/mediawiki.special/mediawiki.special.upload.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/mediawiki.special/mediawiki.special.upload.js b/resources/mediawiki.special/mediawiki.special.upload.js index d6f6e52c2c..d7b86d78fe 100644 --- a/resources/mediawiki.special/mediawiki.special.upload.js +++ b/resources/mediawiki.special/mediawiki.special.upload.js @@ -19,12 +19,13 @@ jQuery( function( $ ) { * Also excludes files over 10M to avoid going insane on memory usage. * * @todo is there a way we can ask the browser what's supported in s? + * @todo put SVG back after working around Firefox 7 bug * * @param {File} file * @return boolean */ function fileIsPreviewable( file ) { - var known = ['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml'], + var known = ['image/png', 'image/gif', 'image/jpeg'], tooHuge = 10 * 1024 * 1024; return ( $.inArray( file.type, known ) !== -1 ) && file.size > 0 && file.size < tooHuge; } -- 2.20.1