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 @@