mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 15:54:43 +08:00
FEATURE: Upload tags from CSV (#6484)
This commit is contained in:
19
app/assets/javascripts/admin/components/tags-uploader.js.es6
Normal file
19
app/assets/javascripts/admin/components/tags-uploader.js.es6
Normal file
@ -0,0 +1,19 @@
|
||||
import UploadMixin from "discourse/mixins/upload";
|
||||
|
||||
export default Em.Component.extend(UploadMixin, {
|
||||
type: "csv",
|
||||
uploadUrl: "/tags/upload",
|
||||
addDisabled: Em.computed.alias("uploading"),
|
||||
elementId: "tag-uploader",
|
||||
|
||||
validateUploadedFilesOptions() {
|
||||
return { csvOnly: true };
|
||||
},
|
||||
|
||||
uploadDone() {
|
||||
bootbox.alert(I18n.t("tagging.upload_successful"), () => {
|
||||
this.sendAction("refresh");
|
||||
this.sendAction("closeModal");
|
||||
});
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user