Page MenuHomeIn-Portal Phabricator

D518.diff
No OneTemporary

File Metadata

Created
Thu, May 8, 4:47 AM

D518.diff

Index: core/admin_templates/js/uploader/moxie.js
===================================================================
--- core/admin_templates/js/uploader/moxie.js
+++ core/admin_templates/js/uploader/moxie.js
@@ -895,6 +895,11 @@
},
use_fileinput: function() {
+ // See https://github.com/moxiecode/moxie/commit/e46f0f9f3d23f97903479fa5c42965e698555e98.
+ if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\/(1.0|2.0|2.5|3.0))/)) {
+ return false;
+ }
+
var el = document.createElement('input');
el.setAttribute('type', 'file');
return !el.disabled;
@@ -5665,12 +5670,10 @@
stream_upload: function(){
return I.can('slice_blob') && I.can('send_multipart');
},
- summon_file_dialog: Test(function() { // yeah... some dirty sniffing here...
- return (Env.browser === 'Firefox' && Env.version >= 4) ||
- (Env.browser === 'Opera' && Env.version >= 12) ||
- (Env.browser === 'IE' && Env.version >= 10) ||
- !!~Basic.inArray(Env.browser, ['Chrome', 'Safari']);
- }()),
+ summon_file_dialog: function() {
+ // CUSTOM: Ignore browser detection.
+ return I.can('select_file');
+ },
upload_filesize: True
},
arguments[2]
@@ -9588,11 +9591,10 @@
stream_upload: function() {
return I.can('select_file');
},
- summon_file_dialog: Test(function() { // yeah... some dirty sniffing here...
- return (Env.browser === 'Firefox' && Env.version >= 4) ||
- (Env.browser === 'Opera' && Env.version >= 12) ||
- !!~Basic.inArray(Env.browser, ['Chrome', 'Safari']);
- }()),
+ summon_file_dialog: function() {
+ // CUSTOM: Ignore browser detection.
+ return I.can('select_file');
+ },
upload_filesize: True,
use_http_method: function(methods) {
return !Basic.arrayDiff(methods, ['GET', 'POST']);

Event Timeline