Merge branch '615-media-upload-canceling-the-second-media-file-deletes-the-first-uploaded-media-file' into 'dev'

Resolve "Media upload: Canceling the second media file deletes the first uploaded media file"

See merge request keanuapp/keanuapp-weblite!322
This commit is contained in:
N Pex 2024-10-29 11:01:39 +00:00
commit 219a052e9c
2 changed files with 5 additions and 1 deletions

View file

@ -1573,7 +1573,9 @@ export default {
cancelSendAttachment() { cancelSendAttachment() {
this.$refs.attachment.value = null; this.$refs.attachment.value = null;
this.cancelSendAttachments(); if (this.sendingStatus != this.sendStatuses.INITIAL) {
this.cancelSendAttachments();
}
this.currentFileInputs = null; this.currentFileInputs = null;
this.attachmentCaption = undefined; this.attachmentCaption = undefined;
this.currentSendError = null; this.currentSendError = null;

View file

@ -123,6 +123,8 @@ export default {
}) })
.then(() => { .then(() => {
this.sendingStatus = this.sendStatuses.SENT; this.sendingStatus = this.sendStatuses.SENT;
this.sendingAttachments = [];
this.sendingRootEventId = null;
}) })
.catch((err) => { .catch((err) => {
console.error("ERROR", err); console.error("ERROR", err);