comment file

This commit is contained in:
Aevann1 2022-02-24 21:53:22 +02:00
parent 713d19fd2c
commit 84243e4c01
2 changed files with 6 additions and 3 deletions

View file

@ -186,7 +186,8 @@ function comment_edit(id){
form.append('formkey', formkey());
form.append('body', document.getElementById('comment-edit-body-'+id).value);
form.append('file', document.getElementById('file-edit-reply-'+id).files[0]);
for (const e of document.getElementById('file-edit-reply-'+id).files)
form.append('file', e);
const xhr = new XMLHttpRequest();
xhr.open("post", "/edit_comment/"+id);
@ -224,7 +225,9 @@ function post_comment(fullname){
form.append('parent_fullname', fullname);
form.append('submission', document.getElementById('reply-form-submission-'+fullname).value);
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
form.append('file', document.getElementById('file-upload-reply-'+fullname).files[0]);
for (const e of document.getElementById('file-upload-reply-'+fullname).files)
form.append('file', e);
const xhr = new XMLHttpRequest();
xhr.open("post", "/comment");

View file

@ -874,7 +874,7 @@
{% if v %}
<script src="/static/assets/js/marked.js?a=243"></script>
<script src="/static/assets/js/comments_v.js?a=260"></script>
<script src="/static/assets/js/comments_v.js?a=261"></script>
{% endif %}
<script src="/static/assets/js/clipboard.js?a=250"></script>