-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathindex.html
More file actions
62 lines (55 loc) · 1.69 KB
/
index.html
File metadata and controls
62 lines (55 loc) · 1.69 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="js/main.js"></script>
<script>
bigUpload = new bigUpload();
//The id of the file input
bigUpload.inputField = 'file';
//The id of the progress bar
//Width of this element will change based on progress
//Content of this element will display a percentage
//See bigUpload.progressUpdate() to change this code
bigUpload.progressBarField = 'progressBarFilled';
//The id of the time remaining field
//Content of this element will display the estimated time remaining for the upload
//See bigUpload.progressUpdate() to change this code
bigUpload.timeRemainingField = 'timeRemaining';
//The id of the text response field
//Content of this element will display the response from the server on success or error
bigUpload.responseField = 'uploadResponse';
//Size of file chunks to upload (in bytes)
//Default: 1MB
bigUpload.chunkSize = 1000000;
//Max file size allowed (in bytes)
//Default: 2GB
bigUpload.maxFileSize = 2147483648;
function upload() {
bigUpload.resetKey();
bigUpload.processFiles();
}
function abort() {
bigUpload.abortFileUpload();
}
</script>
</head>
<body>
<div id="bigUpload">
<div class="container">
<h1>Big Upload</h1>
<form>
<input type="file" id="file" />
<input type="button" class="button" value="Start Upload" onclick="upload()" />
<input type="button" class="button abort" value="Cancel" onclick="abort()" />
</form>
<div id="progressBarContainer">
<div id="progressBarFilled">
</div>
<div id="timeRemaining"></div>
</div>
<div id="uploadResponse"></div>
</div>
</div>
</body>
</html>