FEATURE: Upload tags from CSV (#6484)

This commit is contained in:
David Taylor
2018-10-15 09:12:54 +01:00
committed by GitHub
parent 8fa59f0548
commit 7ac08f936e
13 changed files with 137 additions and 2 deletions

View 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");
});
}
});