Allow theme asset upload url to be overridden
This commit is contained in:
parent
4111f17f64
commit
7426e63c30
|
@ -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'),
|
||||
|
|
Loading…
Reference in New Issue