Compare commits
5 commits
e66955cabe
...
2d6005da58
Author | SHA1 | Date | |
---|---|---|---|
2d6005da58 | |||
1da6a2a261 | |||
99f9b3273b | |||
a0ad9a6814 | |||
61db0c5350 |
3 changed files with 12 additions and 11 deletions
17
index.html
17
index.html
|
@ -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>
|
||||
|
|
|
@ -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='';
|
||||
});
|
||||
|
|
|
@ -45,7 +45,6 @@ audio {
|
|||
}
|
||||
|
||||
.markdown {
|
||||
max-width: 36em;
|
||||
text-align: left;
|
||||
word-wrap: normal;
|
||||
margin: auto;
|
||||
|
|
Loading…
Reference in a new issue