diff --git a/app/assets/javascripts/admin/addon/components/theme-upload-add.js b/app/assets/javascripts/admin/addon/components/theme-upload-add.js index 5a8a359f130..f2d9a895a9a 100644 --- a/app/assets/javascripts/admin/addon/components/theme-upload-add.js +++ b/app/assets/javascripts/admin/addon/components/theme-upload-add.js @@ -55,6 +55,8 @@ export default class ThemeUploadAdd extends Component { @tracked fileSelected = false; @tracked flash; + uploadUrl = this.args.model.uploadUrl || "/admin/themes/upload_asset"; + get disabled() { return this.errorMessage && this.fileSelected; } @@ -97,7 +99,7 @@ export default class ThemeUploadAdd extends Component { options.data.append("file", file); try { - const result = await ajax("/admin/themes/upload_asset", options); + const result = await ajax(this.uploadUrl, options); const upload = { upload_id: result.upload_id, name: this.name,