fix bug affecting main picture in /submit

pull/136/head
Aevann 2023-02-27 19:28:20 +02:00
parent c6dcb2e93d
commit 3d40cab998
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ function register_new_elements(e) {
});
}
const file_inputs = document.querySelectorAll('input[type="file"]')
const file_inputs = document.querySelectorAll('input[type="file"]:not(.not-handle-files)')
for (const input of file_inputs) {
input.onchange = () => {handle_files(input, input.files)};
}

View File

@ -43,7 +43,7 @@
<img loading="lazy" id="image-preview" style="max-width:50%">
<label class="btn btn-secondary m-0" for="file-upload">
<div id="filename-show">Select File</div>
<input autocomplete="off" id="file-upload" accept="image/*, video/*, audio/*" type="file" name="file-url" {% if g.is_tor %}disabled{% endif %} hidden>
<input class="not-handle-files" autocomplete="off" id="file-upload" accept="image/*, video/*, audio/*" type="file" name="file-url" {% if g.is_tor %}disabled{% endif %} hidden>
</label>
<small class="form-text text-muted">Optional if you have text.</small>
<small class="form-text text-muted">You can upload images, videos, or audio.</small>