This repository has been archived by the owner on Jan 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
62 lines (61 loc) · 1.61 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
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>
<title>Resumable JS Demo</title>
</head>
<body>
<a href="#" id="browseButton">Select files</a>
<script src="resumable.js"></script>
<script>
var r = new Resumable({
target: 'http://localhost:8080/upload',
query: {
title: 'Title',
abstract: 'Abstract',
description: 'Description',
category: 'test',
thumbnail: '00:10:00'
}
});
r.assignBrowse(document.getElementById('browseButton'));
r.on('fileSuccess', function (file) {
console.debug('fileSuccess', file);
});
r.on('fileProgress', function (file) {
console.debug('fileProgress', file);
});
r.on('fileAdded', function (file, event) {
r.upload();
console.debug('fileAdded', event);
});
r.on('filesAdded', function (array) {
r.upload();
console.debug('filesAdded', array);
});
r.on('fileRetry', function (file) {
console.debug('fileRetry', file);
});
r.on('fileError', function (file, message) {
console.debug('fileError', file, message);
});
r.on('uploadStart', function () {
console.debug('uploadStart');
});
r.on('complete', function () {
console.debug('complete');
});
r.on('progress', function () {
console.debug('progress');
});
r.on('error', function (message, file) {
console.debug('error', message, file);
});
r.on('pause', function () {
console.debug('pause');
});
r.on('cancel', function () {
console.debug('cancel');
});
</script>
</body>
</html>