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