diff options
Diffstat (limited to 'themes/alps')
-rw-r--r-- | themes/alps/assets/attachments.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/themes/alps/assets/attachments.js b/themes/alps/assets/attachments.js index 612808a..dc6cc04 100644 --- a/themes/alps/assets/attachments.js +++ b/themes/alps/assets/attachments.js @@ -80,6 +80,12 @@ function attachFile(file) { attachments = attachments.filter(a => a !== attachment); node.remove(); updateState(); + + if (typeof attachment.uuid !== "undefined") { + const cancel = new XMLHttpRequest(); + cancel.open("POST", `/compose/attachment/${attachment.uuid}/remove`); + cancel.send(); + } }); let formData = new FormData(); |