forked from pekebyte/pekeUpload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
73 lines (66 loc) · 2.68 KB
/
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
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
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>PekeUpload jQuery Plugin Demo</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
<link href="css/themes/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/custom.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/pekeUpload.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#file").pekeUpload();
$("#file2").pekeUpload({theme:'bootstrap'});
$("#file3").pekeUpload({theme:'bootstrap', allowedExtensions:"jpeg|jpg|png|gif"});
$("#file4").pekeUpload({theme:'bootstrap', multi:false});
$("#file5").pekeUpload({theme:'bootstrap', allowedExtensions:"jpeg|jpg|png|gif", onFileError:function(file,error){alert("error on file: "+file.name+" error: "+error+"")}});
});
</script>
</head>
<body>
<div class="container">
<div id="header">
<h1>PekeUpload jQuery Plugin</h1>
</div>
<div id="content">
<h2>Demos</h2>
<div class="row">
<!--BASIC CONFIGURATION -->
<div class="span9">
<h4>1. - Basic configuration</h4>
<p>Sample Code:
<pre>$("#file").pekeUpload();</pre></p>
<input type="file" id="file" name="file" />
</div>
<!--Twitter Bootstrap Theme -->
<div class="span9">
<h4>2. - Twitter bootstrap theme</h4>
<p>Sample Code:
<pre>$("#file").pekeUpload({theme:'bootstrap'});</pre></p>
<input type="file" id="file2" name="file2" />
</div>
<!--Restrict extensions -->
<div class="span9">
<h4>3. - Restrict File Extensions</h4>
<p>Sample Code:
<pre>$("#file").pekeUpload({theme:'bootstrap', allowedExtensions:"jpeg|jpg|png|gif"});</pre></p>
<input type="file" id="file3" name="file3" />
</div>
<div class="span9">
<h4>4. - Single file upload</h4>
<p>Sample Code:
<pre>$("#file").pekeUpload({theme:'bootstrap', multi: false});</pre></p>
<input type="file" id="file4" name="file4" />
</div>
<div class="span9">
<h4>5. - Alert on error</h4>
<p>Sample Code:
<pre>$("#file5").pekeUpload({theme:'bootstrap', allowedExtensions:"jpeg|jpg|png|gif", onFileError:function(file,error){alert("error on file: "+file.name+" error: "+error+"")}});</pre></p>
<input type="file" id="file5" name="file5" />
</div>
</div>
</div>
</div>
</div>
</body>
</html>