Skip to content

Commit 18b84b1

Browse files
committed
Send attachments too.
1 parent 0393789 commit 18b84b1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

web_src/js/markup/tasklist.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,20 @@ export function initMarkupTasklist() {
4343

4444
try {
4545
const editContentZone = container.querySelector('.edit-content-zone');
46-
const {updateUrl, context} = editContentZone.dataset;
46+
const {updateUrl, context, attachmentUrl} = editContentZone.dataset;
47+
48+
const resp = await fetch(attachmentUrl);
49+
const attachments = await resp.json();
50+
const files = [];
51+
for (const attachment of attachments) {
52+
files.push(attachment.uuid);
53+
}
4754

4855
await $.post(updateUrl, {
4956
_csrf: window.config.csrf,
5057
content: newContent,
5158
context,
59+
files
5260
});
5361

5462
rawContent.textContent = newContent;

0 commit comments

Comments
 (0)