提交 | 用户 | 时间
|
58d006
|
1 |
<!DOCTYPE HTML> |
A |
2 |
<!-- |
|
3 |
/* |
|
4 |
* jQuery File Upload Plugin Demo 8.8.3 |
|
5 |
* https://github.com/blueimp/jQuery-File-Upload |
|
6 |
* |
|
7 |
* Copyright 2010, Sebastian Tschan |
|
8 |
* https://blueimp.net |
|
9 |
* |
|
10 |
* Licensed under the MIT license: |
|
11 |
* http://www.opensource.org/licenses/MIT |
|
12 |
*/ |
|
13 |
--> |
|
14 |
<html lang="en"> |
|
15 |
<head> |
|
16 |
<!-- Force latest IE rendering engine or ChromeFrame if installed --> |
|
17 |
<!--[if IE]> |
|
18 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|
19 |
<![endif]--> |
|
20 |
<meta charset="utf-8"> |
|
21 |
<title>jQuery File Upload Demo</title> |
|
22 |
<meta name="description" content="File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery. Supports cross-domain, chunked and resumable file uploads and client-side image resizing. Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads."> |
|
23 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
24 |
<!-- Bootstrap styles --> |
|
25 |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> |
|
26 |
<!-- Generic page styles --> |
|
27 |
<link rel="stylesheet" href="css/style.css"> |
|
28 |
<!-- blueimp Gallery styles --> |
|
29 |
<link rel="stylesheet" href="http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css"> |
|
30 |
<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars --> |
|
31 |
<link rel="stylesheet" href="css/jquery.fileupload-ui.css"> |
|
32 |
<!-- CSS adjustments for browsers with JavaScript disabled --> |
|
33 |
<noscript><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"></noscript> |
|
34 |
</head> |
|
35 |
<body> |
|
36 |
<div class="navbar navbar-default navbar-fixed-top"> |
|
37 |
<div class="container"> |
|
38 |
<div class="navbar-header"> |
|
39 |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top .navbar-collapse"> |
|
40 |
<span class="icon-bar"></span> |
|
41 |
<span class="icon-bar"></span> |
|
42 |
<span class="icon-bar"></span> |
|
43 |
</button> |
|
44 |
<a class="navbar-brand" href="https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload</a> |
|
45 |
</div> |
|
46 |
<div class="navbar-collapse collapse"> |
|
47 |
<ul class="nav navbar-nav"> |
|
48 |
<li><a href="https://github.com/blueimp/jQuery-File-Upload/tags">Download</a></li> |
|
49 |
<li><a href="https://github.com/blueimp/jQuery-File-Upload">Source Code</a></li> |
|
50 |
<li><a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Documentation</a></li> |
|
51 |
<li><a href="https://blueimp.net">© Sebastian Tschan</a></li> |
|
52 |
</ul> |
|
53 |
</div> |
|
54 |
</div> |
|
55 |
</div> |
|
56 |
<div class="container"> |
|
57 |
<h1>jQuery File Upload Demo</h1> |
|
58 |
<h2 class="lead">Basic Plus UI version</h2> |
|
59 |
<ul class="nav nav-tabs"> |
|
60 |
<li><a href="basic.html">Basic</a></li> |
|
61 |
<li><a href="basic-plus.html">Basic Plus</a></li> |
|
62 |
<li class="active"><a href="index.html">Basic Plus UI</a></li> |
|
63 |
<li><a href="angularjs.html">AngularJS</a></li> |
|
64 |
<li><a href="jquery-ui.html">jQuery UI</a></li> |
|
65 |
</ul> |
|
66 |
<br> |
|
67 |
<blockquote> |
|
68 |
<p>File Upload widget with multiple file selection, drag&drop support, progress bars, validation and preview images, audio and video for jQuery.<br> |
|
69 |
Supports cross-domain, chunked and resumable file uploads and client-side image resizing.<br> |
|
70 |
Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.</p> |
|
71 |
</blockquote> |
|
72 |
<br> |
|
73 |
<!-- The file upload form used as target for the file upload widget --> |
|
74 |
<form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data"> |
|
75 |
<!-- Redirect browsers with JavaScript disabled to the origin page --> |
|
76 |
<noscript><input type="hidden" name="redirect" value="http://blueimp.github.io/jQuery-File-Upload/"></noscript> |
|
77 |
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload --> |
|
78 |
<div class="row fileupload-buttonbar"> |
|
79 |
<div class="col-lg-7"> |
|
80 |
<!-- The fileinput-button span is used to style the file input field as button --> |
|
81 |
<span class="btn btn-success fileinput-button"> |
|
82 |
<i class="glyphicon glyphicon-plus"></i> |
|
83 |
<span>Add files...</span> |
|
84 |
<input type="file" name="files[]" multiple> |
|
85 |
</span> |
|
86 |
<button type="submit" class="btn btn-primary start"> |
|
87 |
<i class="glyphicon glyphicon-upload"></i> |
|
88 |
<span>Start upload</span> |
|
89 |
</button> |
|
90 |
<button type="reset" class="btn btn-warning cancel"> |
|
91 |
<i class="glyphicon glyphicon-ban-circle"></i> |
|
92 |
<span>Cancel upload</span> |
|
93 |
</button> |
|
94 |
<button type="button" class="btn btn-danger delete"> |
|
95 |
<i class="glyphicon glyphicon-trash"></i> |
|
96 |
<span>Delete</span> |
|
97 |
</button> |
|
98 |
<input type="checkbox" class="toggle"> |
|
99 |
<!-- The loading indicator is shown during file processing --> |
|
100 |
<span class="fileupload-loading"></span> |
|
101 |
</div> |
|
102 |
<!-- The global progress information --> |
|
103 |
<div class="col-lg-5 fileupload-progress fade"> |
|
104 |
<!-- The global progress bar --> |
|
105 |
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100"> |
|
106 |
<div class="progress-bar progress-bar-success" style="width:0%;"></div> |
|
107 |
</div> |
|
108 |
<!-- The extended global progress information --> |
|
109 |
<div class="progress-extended"> </div> |
|
110 |
</div> |
|
111 |
</div> |
|
112 |
<!-- The table listing the files available for upload/download --> |
|
113 |
<table role="presentation" class="table table-striped"><tbody class="files"></tbody></table> |
|
114 |
</form> |
|
115 |
<br> |
|
116 |
<div class="panel panel-default"> |
|
117 |
<div class="panel-heading"> |
|
118 |
<h3 class="panel-title">Demo Notes</h3> |
|
119 |
</div> |
|
120 |
<div class="panel-body"> |
|
121 |
<ul> |
|
122 |
<li>The maximum file size for uploads in this demo is <strong>5 MB</strong> (default file size is unlimited).</li> |
|
123 |
<li>Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in this demo (by default there is no file type restriction).</li> |
|
124 |
<li>Uploaded files will be deleted automatically after <strong>5 minutes</strong> (demo setting).</li> |
|
125 |
<li>You can <strong>drag & drop</strong> files from your desktop on this webpage (see <a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support">Browser support</a>).</li> |
|
126 |
<li>Please refer to the <a href="https://github.com/blueimp/jQuery-File-Upload">project website</a> and <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">documentation</a> for more information.</li> |
|
127 |
<li>Built with Twitter's <a href="http://twitter.github.com/bootstrap/">Bootstrap</a> CSS framework and Icons from <a href="http://glyphicons.com/">Glyphicons</a>.</li> |
|
128 |
</ul> |
|
129 |
</div> |
|
130 |
</div> |
|
131 |
</div> |
|
132 |
<!-- The blueimp Gallery widget --> |
|
133 |
<div id="blueimp-gallery" class="blueimp-gallery blueimp-gallery-controls" data-filter=":even"> |
|
134 |
<div class="slides"></div> |
|
135 |
<h3 class="title"></h3> |
|
136 |
<a class="prev">‹</a> |
|
137 |
<a class="next">›</a> |
|
138 |
<a class="close">×</a> |
|
139 |
<a class="play-pause"></a> |
|
140 |
<ol class="indicator"></ol> |
|
141 |
</div> |
|
142 |
<!-- The template to display files available for upload --> |
|
143 |
<script id="template-upload" type="text/x-tmpl"> |
|
144 |
{% for (var i=0, file; file=o.files[i]; i++) { %} |
|
145 |
<tr class="template-upload fade"> |
|
146 |
<td> |
|
147 |
<span class="preview"></span> |
|
148 |
</td> |
|
149 |
<td> |
|
150 |
<p class="name">{%=file.name%}</p> |
|
151 |
{% if (file.error) { %} |
|
152 |
<div><span class="label label-danger">Error</span> {%=file.error%}</div> |
|
153 |
{% } %} |
|
154 |
</td> |
|
155 |
<td> |
|
156 |
<p class="size">{%=o.formatFileSize(file.size)%}</p> |
|
157 |
{% if (!o.files.error) { %} |
|
158 |
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div> |
|
159 |
{% } %} |
|
160 |
</td> |
|
161 |
<td> |
|
162 |
{% if (!o.files.error && !i && !o.options.autoUpload) { %} |
|
163 |
<button class="btn btn-primary start"> |
|
164 |
<i class="glyphicon glyphicon-upload"></i> |
|
165 |
<span>Start</span> |
|
166 |
</button> |
|
167 |
{% } %} |
|
168 |
{% if (!i) { %} |
|
169 |
<button class="btn btn-warning cancel"> |
|
170 |
<i class="glyphicon glyphicon-ban-circle"></i> |
|
171 |
<span>Cancel</span> |
|
172 |
</button> |
|
173 |
{% } %} |
|
174 |
</td> |
|
175 |
</tr> |
|
176 |
{% } %} |
|
177 |
</script> |
|
178 |
<!-- The template to display files available for download --> |
|
179 |
<script id="template-download" type="text/x-tmpl"> |
|
180 |
{% for (var i=0, file; file=o.files[i]; i++) { %} |
|
181 |
<tr class="template-download fade"> |
|
182 |
<td> |
|
183 |
<span class="preview"> |
|
184 |
{% if (file.thumbnailUrl) { %} |
|
185 |
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a> |
|
186 |
{% } %} |
|
187 |
</span> |
|
188 |
</td> |
|
189 |
<td> |
|
190 |
<p class="name"> |
|
191 |
{% if (file.url) { %} |
|
192 |
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a> |
|
193 |
{% } else { %} |
|
194 |
<span>{%=file.name%}</span> |
|
195 |
{% } %} |
|
196 |
</p> |
|
197 |
{% if (file.error) { %} |
|
198 |
<div><span class="label label-danger">Error</span> {%=file.error%}</div> |
|
199 |
{% } %} |
|
200 |
</td> |
|
201 |
<td> |
|
202 |
<span class="size">{%=o.formatFileSize(file.size)%}</span> |
|
203 |
</td> |
|
204 |
<td> |
|
205 |
{% if (file.deleteUrl) { %} |
|
206 |
<button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}> |
|
207 |
<i class="glyphicon glyphicon-trash"></i> |
|
208 |
<span>Delete</span> |
|
209 |
</button> |
|
210 |
<input type="checkbox" name="delete" value="1" class="toggle"> |
|
211 |
{% } else { %} |
|
212 |
<button class="btn btn-warning cancel"> |
|
213 |
<i class="glyphicon glyphicon-ban-circle"></i> |
|
214 |
<span>Cancel</span> |
|
215 |
</button> |
|
216 |
{% } %} |
|
217 |
</td> |
|
218 |
</tr> |
|
219 |
{% } %} |
|
220 |
</script> |
|
221 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> |
|
222 |
<!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included --> |
|
223 |
<script src="js/vendor/jquery.ui.widget.js"></script> |
|
224 |
<!-- The Templates plugin is included to render the upload/download listings --> |
|
225 |
<script src="http://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script> |
|
226 |
<!-- The Load Image plugin is included for the preview images and image resizing functionality --> |
|
227 |
<script src="http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js"></script> |
|
228 |
<!-- The Canvas to Blob plugin is included for image resizing functionality --> |
|
229 |
<script src="http://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script> |
|
230 |
<!-- Bootstrap JS is not required, but included for the responsive demo navigation --> |
|
231 |
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> |
|
232 |
<!-- blueimp Gallery script --> |
|
233 |
<script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script> |
|
234 |
<!-- The Iframe Transport is required for browsers without support for XHR file uploads --> |
|
235 |
<script src="js/jquery.iframe-transport.js"></script> |
|
236 |
<!-- The basic File Upload plugin --> |
|
237 |
<script src="js/jquery.fileupload.js"></script> |
|
238 |
<!-- The File Upload processing plugin --> |
|
239 |
<script src="js/jquery.fileupload-process.js"></script> |
|
240 |
<!-- The File Upload image preview & resize plugin --> |
|
241 |
<script src="js/jquery.fileupload-image.js"></script> |
|
242 |
<!-- The File Upload audio preview plugin --> |
|
243 |
<script src="js/jquery.fileupload-audio.js"></script> |
|
244 |
<!-- The File Upload video preview plugin --> |
|
245 |
<script src="js/jquery.fileupload-video.js"></script> |
|
246 |
<!-- The File Upload validation plugin --> |
|
247 |
<script src="js/jquery.fileupload-validate.js"></script> |
|
248 |
<!-- The File Upload user interface plugin --> |
|
249 |
<script src="js/jquery.fileupload-ui.js"></script> |
|
250 |
<!-- The main application script --> |
|
251 |
<script src="js/main.js"></script> |
|
252 |
<!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 --> |
|
253 |
<!--[if (gte IE 8)&(lt IE 10)]> |
|
254 |
<script src="js/cors/jquery.xdr-transport.js"></script> |
|
255 |
<![endif]--> |
|
256 |
</body> |
|
257 |
</html> |