From 7426e63c303c8c5cfa354cc60e8867f0844eb740 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 28 Mar 2018 02:31:32 +0100 Subject: [PATCH] Allow theme asset upload url to be overridden --- .../admin/controllers/modals/admin-add-upload.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 index 2eb6993b2fe..56e43ccbd83 100644 --- a/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 +++ b/app/assets/javascripts/admin/controllers/modals/admin-add-upload.js.es6 @@ -8,6 +8,8 @@ const THEME_FIELD_VARIABLE_TYPE_IDS = [2, 3, 4]; export default Ember.Controller.extend(ModalFunctionality, { adminCustomizeThemesShow: Ember.inject.controller(), + uploadUrl: '/admin/themes/upload_asset', + onShow() { this.set('name', null); this.set('fileSelected', false); @@ -52,7 +54,7 @@ export default Ember.Controller.extend(ModalFunctionality, { options.data.append('file', file); - ajax('/admin/themes/upload_asset', options).then(result => { + ajax(this.get('uploadUrl'), options).then(result => { const upload = { upload_id: result.upload_id, name: this.get('name'),