Allow theme asset upload url to be overridden

This commit is contained in:
David Taylor 2018-03-28 02:31:32 +01:00 committed by Sam
parent 4111f17f64
commit 7426e63c30
1 changed files with 3 additions and 1 deletions

View File

@ -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'),