-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
26 lines (25 loc) · 849 Bytes
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!DOCTYPE html>
<html>
<head>
<title>Chunked Multipart Test</title>
<script type="text/javascript" src="client.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form id="pieces">
<p>
Amount of pieces to request.<br />
If field is left blank then infinite amount will be requested. Thus data will be consumed and added to the DOM until page crashes eventually.
</p>
<input type="text" id="count" /><input type="button" id="request" value="request">
</form>
</body>
<script type="text/javascript">
document.getElementById('request').onclick = function () {
var form = document.getElementById('pieces'),
countInput = document.getElementById('count'),
count = parseInt(countInput.value, 10);
handleMultipart('/multipart' + (count ? '?count='+count : ''));
};
</script>
</html>