Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F871879
D518.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, May 8, 4:47 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, May 9, 4:47 AM (12 h, 4 m)
Engine
blob
Format
Raw Data
Handle
617719
Attached To
D518: INP-1907 - Permit file uploads in any Web Browser
D518.diff
View Options
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
Log In to Comment