mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 16:46:12 +08:00
FEATURE: Use uppy for watched word uploader (#14817)
This commit, while changing the watched word uploader to use uppy, also fixes a minor bug with the UppyUploadMixin where the file input's value was not cleared after reset, which prevented subsequent file uploads. The composer mixin already has this fix.
This commit is contained in:
parent
6360d3d4e7
commit
1dddbf3d47
|
@ -1,15 +1,16 @@
|
|||
import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
import UppyUploadMixin from "discourse/mixins/uppy-upload";
|
||||
import { alias } from "@ember/object/computed";
|
||||
import bootbox from "bootbox";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
|
||||
export default Component.extend(UploadMixin, {
|
||||
export default Component.extend(UppyUploadMixin, {
|
||||
type: "txt",
|
||||
classNames: "watched-words-uploader",
|
||||
uploadUrl: "/admin/customize/watched_words/upload",
|
||||
addDisabled: alias("uploading"),
|
||||
preventDirectS3Uploads: true,
|
||||
|
||||
validateUploadedFilesOptions() {
|
||||
return { skipValidation: true };
|
||||
|
|
|
@ -287,5 +287,6 @@ export default Mixin.create({
|
|||
processing: false,
|
||||
uploadProgress: 0,
|
||||
});
|
||||
this.fileInputEl.value = "";
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user