forked from 23/resumable.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
53 lines (46 loc) · 1.14 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
<a href="#" id="browseButton">Select files</a>
<script src="resumable.js"></script>
<script>
var r = new Resumable({
target: 'test.html'
});
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>