Add human bytes conversion with maximum size (#7)

This commit is contained in:
Beu
2020-02-24 23:35:33 +01:00
parent 907d92639f
commit 2ec44d4a50
4 changed files with 18 additions and 6 deletions

View File

@ -24,13 +24,15 @@
<div id=dragzone class=dragndrop ondrop="file_dropped(event);" ondragover="return false" ondragenter="change_color_ondrag('ondragenter');" ondragleave="change_color_ondrag('ondragleave');" >
Drag and Drop your file or <input class="button" type="button" value="Select File" onclick="file_explorer();">
<input type="file" id="uploadfile" hidden>
<br>
<small>(Maximum <?php print(formatBytes(_SIZE_LIMIT)); ?>)</small>
<br><br><br><br>
<div id=divresponse></div><button class="button" id=copytoclipboard style="visibility: hidden;" onclick="copytoclipboard();">Copy to clipboard</button>
</div>
<div class=infobox>
This tool is usable with <b>curl</b> or <b>wget</b>.<br><br>
To upload file: <br>
To upload file (max <?php print(formatBytes(_SIZE_LIMIT)); ?>): <br>
<li> curl --upload-file ./my_file <?php print($uploadurl);?><br>
<li> wget -q --body-file='./my_file' --method=PUT -O - <?php print($uploadurl);?><br><br>