mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 22:02:42 +08:00
Allow theme asset upload url to be overridden
This commit is contained in:
@ -8,6 +8,8 @@ const THEME_FIELD_VARIABLE_TYPE_IDS = [2, 3, 4];
|
|||||||
export default Ember.Controller.extend(ModalFunctionality, {
|
export default Ember.Controller.extend(ModalFunctionality, {
|
||||||
adminCustomizeThemesShow: Ember.inject.controller(),
|
adminCustomizeThemesShow: Ember.inject.controller(),
|
||||||
|
|
||||||
|
uploadUrl: '/admin/themes/upload_asset',
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
this.set('name', null);
|
this.set('name', null);
|
||||||
this.set('fileSelected', false);
|
this.set('fileSelected', false);
|
||||||
@ -52,7 +54,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
|
|||||||
|
|
||||||
options.data.append('file', file);
|
options.data.append('file', file);
|
||||||
|
|
||||||
ajax('/admin/themes/upload_asset', options).then(result => {
|
ajax(this.get('uploadUrl'), options).then(result => {
|
||||||
const upload = {
|
const upload = {
|
||||||
upload_id: result.upload_id,
|
upload_id: result.upload_id,
|
||||||
name: this.get('name'),
|
name: this.get('name'),
|
||||||
|
Reference in New Issue
Block a user