diff --git a/src/components/Chat.vue b/src/components/Chat.vue index c7bf791..6f294a2 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -1234,6 +1234,7 @@ export default { }) const promises = inputFiles.map(inputFile => util.sendImage(this.$matrix.matrixClient, this.roomId, inputFile, this.onUploadProgress)); + this.currentSendOperation = promises; Promise.all(promises).then(() => { this.currentSendOperation = null; @@ -1260,7 +1261,7 @@ export default { cancelSendAttachment() { this.$refs.attachment.value = null; if (this.currentSendOperation) { - this.currentSendOperation.abort(); + this.currentSendOperation.forEach(o => o.abort()); } this.currentSendOperation = null; this.currentFileInputs = null;