tus-js-client-olalonde
Version:
A pure JavaScript client for the tus resumable upload protocol
90 lines (78 loc) • 2.34 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<title>tus-js-client demo</title>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet" />
<link href="/demo/demo.css" rel="stylesheet" media="screen" />
</head>
<body>
<div class="container">
<h1>tus-js-client demo</h1>
<p>
For a prettier demo please go to the
<a href="http://tus.io/demo.html">tus.io</a> website.
This demo is just here to aid developers.
</p>
<div class="alert alert-warining hidden" id="support-alert">
<b>Warning!</b> Your browser does not seem to support the features necessary to run tus-js-client. The buttons below may work but probably will fail silently.
</div>
<br />
<table>
<tr>
<td>
<label for="endpoint">
Upload endpoint:
</label>
</td>
<td>
<input type="text" id="endpoint" name="endpoint" value="http://master.tus.io/files/">
</td>
</tr>
<tr>
<td>
<label for="chunksize">
Chunk size (bytes):
</label>
</td>
<td>
<input type="number" id="chunksize" name="chunksize">
</td>
</tr>
<tr>
<td>
<label for="resume">
Perform full upload:
<br />
<small>(even if we could resume)</small>
</label>
</td>
<td>
<input type="checkbox" id="resume">
</td>
</tr>
</table>
<br />
<input type="file">
<br />
<br />
<div class="row">
<div class="span8">
<div class="progress progress-striped progress-success">
<div class="bar" style="width: 0%;"></div>
</div>
</div>
<div class="span4">
<button class="btn btn-danger stop disabled" id="stop-btn"><i class="icon-white icon-stop"></i> abort upload</button>
</div>
</div>
<hr />
<h3>Uploads</h3>
<p>
Succesful uploads will be listed here. Try one!
</p>
</div>
</body>
<script src="../dist/tus.js"></script>
<script src="./demo.js"></script>
</html>