4 * jQuery File Upload Plugin Demo 6.14
5 * https://github.com/blueimp/jQuery-File-Upload
7 * Copyright 2010, Sebastian Tschan
10 * Licensed under the MIT license:
11 * http://www.opensource.org/licenses/MIT
16 <!-- Force latest IE rendering engine or ChromeFrame if installed -->
17 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
18 <meta charset=
"utf-8">
19 <title>jQuery File Upload Demo
</title>
20 <meta name=
"description" content=
"File Upload widget with multiple file selection, drag&drop support, progress bar and preview images for jQuery. Supports cross-domain, chunked and resumable file uploads. Works with any server-side platform (Google App Engine, PHP, Python, Ruby on Rails, Java, etc.) that supports standard HTML form file uploads.">
21 <meta name=
"viewport" content=
"width=device-width">
22 <!-- jQuery UI styles -->
23 <link rel=
"stylesheet" href=
"http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" id=
"theme">
24 <!-- jQuery Image Gallery styles -->
25 <link rel=
"stylesheet" href=
"http://blueimp.github.com/jQuery-Image-Gallery/css/jquery.image-gallery.min.css">
26 <!-- CSS to style the file input field as button and adjust the jQuery UI progress bars -->
27 <link rel=
"stylesheet" href=
"css/jquery.fileupload-ui.css">
28 <!-- CSS adjustments for browsers with JavaScript disabled -->
29 <noscript><link rel=
"stylesheet" href=
"css/jquery.fileupload-ui-noscript.css"></noscript>
30 <!-- Generic page styles -->
31 <link rel=
"stylesheet" href=
"css/style.css">
32 <!-- Shim to make HTML5 elements usable in older Internet Explorer versions -->
33 <!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
36 <div class=
"navbar navbar-fixed-top">
37 <div class=
"navbar-inner">
38 <div class=
"container">
39 <a class=
"btn btn-navbar" data-toggle=
"collapse" data-target=
".nav-collapse">
40 <span class=
"icon-bar"></span>
41 <span class=
"icon-bar"></span>
42 <span class=
"icon-bar"></span>
44 <a class=
"brand" href=
"https://github.com/blueimp/jQuery-File-Upload">jQuery File Upload
</a>
45 <div class=
"nav-collapse">
47 <li class=
"active"><a href=
"http://blueimp.github.com/jQuery-File-Upload/">Demo
</a></li>
48 <li><a href=
"https://github.com/blueimp/jQuery-File-Upload#download">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://github.com/blueimp/jQuery-File-Upload#support">Support
</a></li>
52 <li><a href=
"https://blueimp.net">© Sebastian Tschan
</a></li>
54 <select id=
"theme-switcher" class=
"pull-right">
55 <option value=
"base" selected
>Base
</option>
56 <option value=
"black-tie">Black Tie
</option>
57 <option value=
"blitzer">Blitzer
</option>
58 <option value=
"cupertino">Cupertino
</option>
59 <option value=
"dark-hive">Dark Hive
</option>
60 <option value=
"dot-luv">Dot Luv
</option>
61 <option value=
"eggplant">Eggplant
</option>
62 <option value=
"excite-bike">Excite Bike
</option>
63 <option value=
"flick">Flick
</option>
64 <option value=
"hot-sneaks">Hot sneaks
</option>
65 <option value=
"humanity">Humanity
</option>
66 <option value=
"le-frog">Le Frog
</option>
67 <option value=
"mint-choc">Mint Choc
</option>
68 <option value=
"overcast">Overcast
</option>
69 <option value=
"pepper-grinder">Pepper Grinder
</option>
70 <option value=
"redmond">Redmond
</option>
71 <option value=
"smoothness">Smoothness
</option>
72 <option value=
"south-street">South Street
</option>
73 <option value=
"start">Start
</option>
74 <option value=
"sunny">Sunny
</option>
75 <option value=
"swanky-purse">Swanky Purse
</option>
76 <option value=
"trontastic">Trontastic
</option>
77 <option value=
"ui-darkness">UI Darkness
</option>
78 <option value=
"ui-lightness">UI Lightness
</option>
79 <option value=
"vader">Vader
</option>
85 <div class=
"container">
86 <div class=
"page-header">
87 <h1>jQuery File Upload Demo
</h1>
90 <p>File Upload widget with multiple file selection, drag
&drop support, progress bars and preview images for jQuery.
<br>
91 Supports cross-domain, chunked and resumable file uploads and client-side image resizing.
<br>
92 Works with any server-side platform (PHP, Python, Ruby on Rails, Java, Node.js, Go etc.) that supports standard HTML form file uploads.
</p>
95 <!-- The file upload form used as target for the file upload widget -->
96 <form id=
"fileupload" action=
"//jquery-file-upload.appspot.com/" method=
"POST" enctype=
"multipart/form-data">
97 <!-- Redirect browsers with JavaScript disabled to the origin page -->
98 <noscript><input type=
"hidden" name=
"redirect" value=
"http://blueimp.github.com/jQuery-File-Upload/"></noscript>
99 <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
100 <div class=
"row fileupload-buttonbar">
102 <!-- The fileinput-button span is used to style the file input field as button -->
103 <span class=
"btn btn-success fileinput-button">
104 <i class=
"icon-plus icon-white"></i>
105 <span>Add files...
</span>
106 <input type=
"file" name=
"files[]" multiple
>
108 <button type=
"submit" class=
"btn btn-primary start">
109 <i class=
"icon-upload icon-white"></i>
110 <span>Start upload
</span>
112 <button type=
"reset" class=
"btn btn-warning cancel">
113 <i class=
"icon-ban-circle icon-white"></i>
114 <span>Cancel upload
</span>
116 <button type=
"button" class=
"btn btn-danger delete">
117 <i class=
"icon-trash icon-white"></i>
120 <input type=
"checkbox" class=
"toggle">
122 <!-- The global progress information -->
123 <div class=
"span5 fileupload-progress fade">
124 <!-- The global progress bar -->
125 <div class=
"progress progress-success progress-striped active" role=
"progressbar" aria-valuemin=
"0" aria-valuemax=
"100">
126 <div class=
"bar" style=
"width:0%;"></div>
128 <!-- The extended global progress information -->
129 <div class=
"progress-extended"> </div>
132 <!-- The loading indicator is shown during file processing -->
133 <div class=
"fileupload-loading"></div>
135 <!-- The table listing the files available for upload/download -->
136 <table role=
"presentation" class=
"table table-striped"><tbody class=
"files" data-toggle=
"modal-gallery" data-target=
"#modal-gallery"></tbody></table>
142 <li>The maximum file size for uploads in this demo is
<strong>5 MB
</strong> (default file size is unlimited).
</li>
143 <li>Only image files (
<strong>JPG, GIF, PNG
</strong>) are allowed in this demo (by default there is no file type restriction).
</li>
144 <li>Uploaded files will be deleted automatically after
<strong>5 minutes
</strong> (demo setting).
</li>
145 <li>You can
<strong>drag
& drop
</strong> files from your desktop on this webpage with Google Chrome, Mozilla Firefox and Apple Safari.
</li>
146 <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>
150 <!-- The template to display files available for upload -->
151 <script id=
"template-upload" type=
"text/x-tmpl">
152 {% for (var i=
0, file; file=o.files[i]; i++) { %}
153 <tr class=
"template-upload fade">
154 <td class=
"preview"><span class=
"fade"></span></td>
155 <td class=
"name"><span>{%=file.name%}
</span></td>
156 <td class=
"size"><span>{%=o.formatFileSize(file.size)%}
</span></td>
157 {% if (file.error) { %}
158 <td class=
"error" colspan=
"2"><span class=
"label label-important">Error
</span> {%=file.error%}
</td>
159 {% } else if (o.files.valid && !i) { %}
161 <div class=
"progress progress-success progress-striped active" role=
"progressbar" aria-valuemin=
"0" aria-valuemax=
"100" aria-valuenow=
"0"><div class=
"bar" style=
"width:0%;"></div></div>
163 <td class=
"start">{% if (!o.options.autoUpload) { %}
164 <button class=
"btn btn-primary">
165 <i class=
"icon-upload icon-white"></i>
170 <td colspan=
"2"></td>
172 <td class=
"cancel">{% if (!i) { %}
173 <button class=
"btn btn-warning">
174 <i class=
"icon-ban-circle icon-white"></i>
181 <!-- The template to display files available for download -->
182 <script id=
"template-download" type=
"text/x-tmpl">
183 {% for (var i=
0, file; file=o.files[i]; i++) { %}
184 <tr class=
"template-download fade">
185 {% if (file.error) { %}
187 <td class=
"name"><span>{%=file.name%}
</span></td>
188 <td class=
"size"><span>{%=o.formatFileSize(file.size)%}
</span></td>
189 <td class=
"error" colspan=
"2"><span class=
"label label-important">Error
</span> {%=file.error%}
</td>
191 <td class=
"preview">{% if (file.thumbnail_url) { %}
192 <a href=
"{%=file.url%}" title=
"{%=file.name%}" data-gallery=
"gallery" download=
"{%=file.name%}"><img src=
"{%=file.thumbnail_url%}"></a>
195 <a href=
"{%=file.url%}" title=
"{%=file.name%}" data-gallery=
"{%=file.thumbnail_url&&'gallery'%}" download=
"{%=file.name%}">{%=file.name%}
</a>
197 <td class=
"size"><span>{%=o.formatFileSize(file.size)%}
</span></td>
198 <td colspan=
"2"></td>
201 <button class=
"btn btn-danger" data-type=
"{%=file.delete_type%}" data-url=
"{%=file.delete_url%}"{% if (file.delete_with_credentials) { %} data-xhr-fields='{
"withCredentials":true}'{% } %}
>
202 <i class=
"icon-trash icon-white"></i>
205 <input type=
"checkbox" name=
"delete" value=
"1">
210 <script src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
211 <script src=
"//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
212 <!-- The Templates plugin is included to render the upload/download listings -->
213 <script src=
"http://blueimp.github.com/JavaScript-Templates/tmpl.min.js"></script>
214 <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
215 <script src=
"http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
216 <!-- The Canvas to Blob plugin is included for image resizing functionality -->
217 <script src=
"http://blueimp.github.com/JavaScript-Canvas-to-Blob/canvas-to-blob.min.js"></script>
218 <!-- jQuery Image Gallery -->
219 <script src=
"http://blueimp.github.com/jQuery-Image-Gallery/js/jquery.image-gallery.min.js"></script>
220 <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
221 <script src=
"js/jquery.iframe-transport.js"></script>
222 <!-- The basic File Upload plugin -->
223 <script src=
"js/jquery.fileupload.js"></script>
224 <!-- The File Upload file processing plugin -->
225 <script src=
"js/jquery.fileupload-fp.js"></script>
226 <!-- The File Upload user interface plugin -->
227 <script src=
"js/jquery.fileupload-ui.js"></script>
228 <!-- The File Upload jQuery UI plugin -->
229 <script src=
"js/jquery.fileupload-jui.js"></script>
230 <!-- The main application script -->
231 <script src=
"js/main.js"></script>
232 <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE8+ -->
233 <!--[if gte IE 8]><script src="js/cors/jquery.xdr-transport.js"></script><![endif]-->