mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:16:41 +08:00
DEV: Allow uploadUrl to be based to theme-upload-add
modal (#23415)
This commit is contained in:
parent
d308360376
commit
152a99b3f4
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user