diff --git a/app/assets/javascripts/discourse/controllers/upload_selector_controller.js b/app/assets/javascripts/discourse/controllers/upload_selector_controller.js index 91739024cf0..85237fdacef 100644 --- a/app/assets/javascripts/discourse/controllers/upload_selector_controller.js +++ b/app/assets/javascripts/discourse/controllers/upload_selector_controller.js @@ -8,8 +8,12 @@ @module Discourse **/ Discourse.UploadSelectorController = Discourse.Controller.extend(Discourse.ModalFunctionality, { - local: true, - remote: Em.computed.not("local"), + local: Em.computed.not("remote"), + remote: Em.computed.not("allowLocal"), + + allowLocal: function() { + return Discourse.SiteSettings.max_attachment_size_kb > 0; + }.property(), actions: { useLocal: function() { this.set("local", true); }, diff --git a/app/assets/javascripts/discourse/templates/modal/upload_selector.js.handlebars b/app/assets/javascripts/discourse/templates/modal/upload_selector.js.handlebars index 826bd31f1b1..c1f4da21ada 100644 --- a/app/assets/javascripts/discourse/templates/modal/upload_selector.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/upload_selector.js.handlebars @@ -1,14 +1,16 @@