This commit is contained in:
Aevann1 2022-02-25 13:43:35 +02:00
parent a13b1bf9c2
commit 078c2f26cf
4 changed files with 10 additions and 4 deletions

View file

@ -75,5 +75,10 @@ function post_toast(t, url, reload, data) {
}
function changename(s1,s2) {
document.getElementById(s1).innerHTML = document.getElementById(s2).files[0].name.substr(0, 20);
let files = document.getElementById(s2).files;
let filename = '';
for (const e of files) {
filename += e.name.substr(0, 20) + ', ';
}
document.getElementById(s1).innerHTML = filename.slice(0, -2);
}

File diff suppressed because one or more lines are too long

View file

@ -256,7 +256,7 @@
</div>
</nav>
<script src="/static/assets/js/header.js?a=248"></script>
<script src="/static/assets/js/header.js?a=249"></script>
{% if v and not err %}
<div id="formkey" class="d-none">{{v.formkey}}</div>

View file

@ -128,7 +128,6 @@
<div class="text-small font-weight-bold mt-1" id="character-count-submit-text-form" style="right: 1rem; bottom: 0.5rem; z-index: 3;"></div>
<div id="preview" class="preview my-3"></div>
</div>
<p></p>
@ -155,6 +154,8 @@
<input autocomplete="off" id="file-upload-submit" multiple="multiple" type="file" name="file2" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="changename('filename-show-submit','file-upload-submit')" hidden>
</label>
<div id="preview" class="preview my-3"></div>
<pre></pre>
<div class="form-text text-small"><a href="/formatting" {% if v and v.newtab and not g.webview %}target="_blank"{% endif %}>Formatting help</a></div>
<pre></pre>