Compare commits

...

5 commits

3 changed files with 12 additions and 11 deletions

View file

@ -22,24 +22,23 @@
<form action="/" method="POST" enctype="multipart/form-data" data-maxsize="1048576000" id="dropzone">
<p id="fallback">
<input id="fileinput" name="file" type="file" />
<input id="submitbtn" type="submit" value="Téléverser">
</p>
<p id="expiry" class="jsonly" style="display: none;">
<label for="expiration">Expiration du fichier :</label>
<input type="number" id="expiration" min="1" max="30" /> jour(s)
<input type="number" id="expiration" min="1" max="30" value="30" /> jour(s)
</p>
<p id="maxdownload" class="jsonly" style="display: none;">
<label for="maxdl">Nombre maximal de téléchargements :</label>
<input type="number" id="maxdl" min="1" />
<input type="number" id="maxdl" min="0" value="0" title="0 signifie pas de limite" />
</p>
<p>
<input id="fileinput" name="file" type="file" />
<input id="submitbtn" type="submit" value="Téléverser">
</p>
</form>
<div class="jsonly" style="display: none;" id="links-container">
<ul id="links">
</ul>
<ol id="links">
</ol>
</div>
<script src="/scripts/upload.js"></script>

View file

@ -32,7 +32,7 @@ function upload(file,exp,maxdl) {
if (exp != "") {
xhr.setRequestHeader('Max-Days',exp);
}
if (maxdl != "") {
if (maxdl != 0) {
xhr.setRequestHeader('Max-Downloads',maxdl);
}
// send file
@ -53,4 +53,7 @@ form.addEventListener('submit', e => {
for (let i = 0; i < files.length; i++) {
upload(files[i],exp,maxdl);
}
// reset file list
document.getElementById('fileinput').value='';
});

View file

@ -45,7 +45,6 @@ audio {
}
.markdown {
max-width: 36em;
text-align: left;
word-wrap: normal;
margin: auto;