diff --git a/gui/app/components/document/section-attachment.js b/gui/app/components/document/section-attachment.js index 53c3bc8e..24d4b0e9 100644 --- a/gui/app/components/document/section-attachment.js +++ b/gui/app/components/document/section-attachment.js @@ -81,6 +81,8 @@ export default Component.extend(Modals, Notifier, { let uploadId = this.get('uploadId'); // Handle upload clicks on button and anything inside that button. + let uploadSuccess = this.i18n.localize('uploaded'); + let sel = ['#' + uploadId, '#' + uploadId + ' > div']; for (var i=0; i < 2; i++) { let dzone = new Dropzone(sel[i], { @@ -101,8 +103,8 @@ export default Component.extend(Modals, Notifier, { this.on("success", function (/*file, response*/ ) { }); - this.on("queuecomplete", function () { - self.notifySuccess(this.i18n.localize('uploaded')); + this.on("queuecomplete", () => { + self.notifySuccess(uploadSuccess); self.get('onAttachmentUpload')(); });