From ca309aa14e017799df2ad792ea0d2accd7b48a9d Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Mon, 26 May 2025 23:54:14 +0300 Subject: [PATCH] feat: provide id on upload context --- Web/Presenters/templates/components/textArea.xml | 2 +- Web/static/js/al_wall.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Web/Presenters/templates/components/textArea.xml b/Web/Presenters/templates/components/textArea.xml index d5778ebd..b4b2ff72 100644 --- a/Web/Presenters/templates/components/textArea.xml +++ b/Web/Presenters/templates/components/textArea.xml @@ -2,7 +2,7 @@ {var $textAreaId = ($post ?? NULL) === NULL ? (++$GLOBALS["textAreaCtr"]) : $post->getId()} {var $textAreaId = ($custom_id ?? NULL) === NULL ? $textAreaId : $custom_id} -
+
diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index 9d529b5c..c288bfdc 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -1191,6 +1191,7 @@ async function __uploadToTextarea(file, textareaNode) { const form_data = new FormData form_data.append('photo_0', file) form_data.append('count', 1) + form_data.append('upload_context', textareaNode.nodes[0].dataset.id) form_data.append("hash", u("meta[name=csrf]").attr("value")) if(filetype == 'photo') {