fix bug affecting main picture in /submit
parent
c6dcb2e93d
commit
3d40cab998
|
@ -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)};
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue