diff --git a/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 b/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 index 954d5f8d2ae..250260dc483 100644 --- a/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 +++ b/app/assets/javascripts/discourse/components/json-file-uploader.js.es6 @@ -32,6 +32,10 @@ export default Em.Component.extend({ }.on('didInsertElement'), + accept: function() { + return ".json,application/json" + (this.get('extension') ? "," + this.get('extension') : ""); + }.property('extension'), + setReady: function() { let parsed; try { diff --git a/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs b/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs index 655e3f7340d..fba3461c547 100644 --- a/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs +++ b/app/assets/javascripts/discourse/templates/components/json-file-uploader.hbs @@ -1,5 +1,5 @@
- + {{d-button class="fileSelect" action="selectFile" class="" icon="upload" label="upload_selector.select_file"}} {{conditional-loading-spinner condition=loading size="small"}}
diff --git a/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs b/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs index 8cc7851b3f3..3e49a755e5a 100644 --- a/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs +++ b/app/assets/javascripts/discourse/templates/modal/upload-customization.hbs @@ -1,6 +1,6 @@