-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
33 lines (31 loc) · 1.16 KB
/
test.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
27
28
29
30
31
32
33
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>hushfile</title>
</head>
<body style="padding: 80px 0 80px 0;">
<input type="file" id="uploadfile" />
<script src="jquery-1.9.1.min.js"></script>
<script src="chunkedfile.js"></script>
<script>
$(document).ready(function() {
$('#uploadfile').change(function(e) {
var file = this.files[0];
var ChunkedFile = window.chunkedfile();
//var cm = new ChunkManager({'filename':file.name});
var cf = ChunkedFile.fromFile({
"file": file
}, function(cf) {
cf.getFile(function(file) {
console.log("file joined");
$('body').append('<a href="' + URL.createObjectURL(file) + '">' + file.name + '</a>');
}, function(e) {
console.log(e);
});
});
});
});
</script>
</body>
</html>