4  * jQuery File Upload Demo
 
   5  * https://github.com/blueimp/jQuery-File-Upload
 
   7  * Copyright 2010, Sebastian Tschan
 
  10  * Licensed under the MIT license:
 
  11  * https://opensource.org/licenses/MIT
 
  16     <!-- Force latest IE rendering engine or ChromeFrame if installed -->
 
  18       <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
 
  20     <meta charset="utf-8" />
 
  21     <title>jQuery File Upload Demo</title>
 
  24       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."
 
  26     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 
  27     <!-- Bootstrap styles -->
 
  30       href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
 
  31       integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
 
  32       crossorigin="anonymous"
 
  34     <!-- Generic page styles -->
 
  39       @media (max-width: 767px) {
 
  46     <!-- blueimp Gallery styles -->
 
  49       href="https://blueimp.github.io/Gallery/css/blueimp-gallery.min.css"
 
  51     <!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
 
  52     <link rel="stylesheet" href="css/jquery.fileupload.css" />
 
  53     <link rel="stylesheet" href="css/jquery.fileupload-ui.css" />
 
  54     <!-- CSS adjustments for browsers with JavaScript disabled -->
 
  56       ><link rel="stylesheet" href="css/jquery.fileupload-noscript.css"
 
  59       ><link rel="stylesheet" href="css/jquery.fileupload-ui-noscript.css"
 
  63     <div class="container">
 
  64       <ul class="nav nav-tabs" id="navigation">
 
  66           <a href="https://github.com/blueimp/jQuery-File-Upload">Project</a>
 
  72           <a href="https://github.com/blueimp/jQuery-File-Upload/wiki">Wiki</a>
 
  75           <a href="https://blueimp.net">Author</a>
 
  78       <h1 id="title">jQuery File Upload Demo</h1>
 
  79       <blockquote id="description">
 
  81           File Upload widget with multiple file selection, drag&drop
 
  82           support, progress bars, validation and preview images, audio and video
 
  84           Supports cross-domain, chunked and resumable file uploads and
 
  85           client-side image resizing.<br />
 
  86           Works with any server-side platform (PHP, Python, Ruby on Rails, Java,
 
  87           Node.js, Go etc.) that supports standard HTML form file uploads.
 
  90       <!-- The file upload form used as target for the file upload widget -->
 
  93         action="https://jquery-file-upload.appspot.com/"
 
  95         enctype="multipart/form-data"
 
  97         <!-- Redirect browsers with JavaScript disabled to the origin page -->
 
 102             value="https://blueimp.github.io/jQuery-File-Upload/"
 
 104         <!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
 
 105         <div class="row fileupload-buttonbar">
 
 106           <div class="col-lg-7">
 
 107             <!-- The fileinput-button span is used to style the file input field as button -->
 
 108             <span class="btn btn-success fileinput-button">
 
 109               <i class="glyphicon glyphicon-plus"></i>
 
 110               <span>Add files...</span>
 
 111               <input type="file" name="files[]" multiple />
 
 113             <button type="submit" class="btn btn-primary start">
 
 114               <i class="glyphicon glyphicon-upload"></i>
 
 115               <span>Start upload</span>
 
 117             <button type="reset" class="btn btn-warning cancel">
 
 118               <i class="glyphicon glyphicon-ban-circle"></i>
 
 119               <span>Cancel upload</span>
 
 121             <button type="button" class="btn btn-danger delete">
 
 122               <i class="glyphicon glyphicon-trash"></i>
 
 123               <span>Delete selected</span>
 
 125             <input type="checkbox" class="toggle" />
 
 126             <!-- The global file processing state -->
 
 127             <span class="fileupload-process"></span>
 
 129           <!-- The global progress state -->
 
 130           <div class="col-lg-5 fileupload-progress fade">
 
 131             <!-- The global progress bar -->
 
 133               class="progress progress-striped active"
 
 139                 class="progress-bar progress-bar-success"
 
 143             <!-- The extended global progress state -->
 
 144             <div class="progress-extended"> </div>
 
 147         <!-- The table listing the files available for upload/download -->
 
 148         <table role="presentation" class="table table-striped">
 
 149           <tbody class="files"></tbody>
 
 152       <div class="panel panel-default">
 
 153         <div class="panel-heading">
 
 154           <h3 class="panel-title">Demo Notes</h3>
 
 156         <div class="panel-body">
 
 159               The maximum file size for uploads in this demo is
 
 160               <strong>999 KB</strong> (default file size is unlimited).
 
 163               Only image files (<strong>JPG, GIF, PNG</strong>) are allowed in
 
 164               this demo (by default there is no file type restriction).
 
 167               Uploaded files will be deleted automatically after
 
 168               <strong>5 minutes or less</strong> (demo files are stored in
 
 172               You can <strong>drag & drop</strong> files from your desktop
 
 175                 href="https://github.com/blueimp/jQuery-File-Upload/wiki/Browser-support"
 
 181               <a href="https://github.com/blueimp/jQuery-File-Upload"
 
 185               <a href="https://github.com/blueimp/jQuery-File-Upload/wiki"
 
 188               for more information.
 
 192               <a href="https://getbootstrap.com/">Bootstrap</a> CSS framework
 
 193               and Icons from <a href="https://glyphicons.com/">Glyphicons</a>.
 
 199     <!-- The blueimp Gallery widget -->
 
 202       class="blueimp-gallery blueimp-gallery-controls"
 
 203       aria-label="image gallery"
 
 208       <div class="slides" aria-live="polite"></div>
 
 209       <h3 class="title"></h3>
 
 212         aria-controls="blueimp-gallery"
 
 213         aria-label="previous slide"
 
 214         aria-keyshortcuts="ArrowLeft"
 
 218         aria-controls="blueimp-gallery"
 
 219         aria-label="next slide"
 
 220         aria-keyshortcuts="ArrowRight"
 
 224         aria-controls="blueimp-gallery"
 
 226         aria-keyshortcuts="Escape"
 
 230         aria-controls="blueimp-gallery"
 
 231         aria-label="play slideshow"
 
 232         aria-keyshortcuts="Space"
 
 236       <ol class="indicator"></ol>
 
 238     <!-- The template to display files available for upload -->
 
 239     <script id="template-upload" type="text/x-tmpl">
 
 240       {% for (var i=0, file; file=o.files[i]; i++) { %}
 
 241           <tr class="template-upload fade{%=o.options.loadImageFileTypes.test(file.type)?' image':''%}">
 
 243                   <span class="preview"></span>
 
 246                   <p class="name">{%=file.name%}</p>
 
 247                   <strong class="error text-danger"></strong>
 
 250                   <p class="size">Processing...</p>
 
 251                   <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>
 
 254                   {% if (!o.options.autoUpload && o.options.edit && o.options.loadImageFileTypes.test(file.type)) { %}
 
 255                     <button class="btn btn-success edit" data-index="{%=i%}" disabled>
 
 256                         <i class="glyphicon glyphicon-edit"></i>
 
 260                   {% if (!i && !o.options.autoUpload) { %}
 
 261                       <button class="btn btn-primary start" disabled>
 
 262                           <i class="glyphicon glyphicon-upload"></i>
 
 267                       <button class="btn btn-warning cancel">
 
 268                           <i class="glyphicon glyphicon-ban-circle"></i>
 
 276     <!-- The template to display files available for download -->
 
 277     <script id="template-download" type="text/x-tmpl">
 
 278       {% for (var i=0, file; file=o.files[i]; i++) { %}
 
 279           <tr class="template-download fade{%=file.thumbnailUrl?' image':''%}">
 
 281                   <span class="preview">
 
 282                       {% if (file.thumbnailUrl) { %}
 
 283                           <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
 
 289                       {% if (file.url) { %}
 
 290                           <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnailUrl?'data-gallery':''%}>{%=file.name%}</a>
 
 292                           <span>{%=file.name%}</span>
 
 295                   {% if (file.error) { %}
 
 296                       <div><span class="label label-danger">Error</span> {%=file.error%}</div>
 
 300                   <span class="size">{%=o.formatFileSize(file.size)%}</span>
 
 303                   {% if (file.deleteUrl) { %}
 
 304                       <button class="btn btn-danger delete" data-type="{%=file.deleteType%}" data-url="{%=file.deleteUrl%}"{% if (file.deleteWithCredentials) { %} data-xhr-fields='{"withCredentials":true}'{% } %}>
 
 305                           <i class="glyphicon glyphicon-trash"></i>
 
 308                       <input type="checkbox" name="delete" value="1" class="toggle">
 
 310                       <button class="btn btn-warning cancel">
 
 311                           <i class="glyphicon glyphicon-ban-circle"></i>
 
 320       src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"
 
 321       integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
 
 322       crossorigin="anonymous"
 
 324     <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
 
 325     <script src="js/vendor/jquery.ui.widget.js"></script>
 
 326     <!-- The Templates plugin is included to render the upload/download listings -->
 
 327     <script src="https://blueimp.github.io/JavaScript-Templates/js/tmpl.min.js"></script>
 
 328     <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
 
 329     <script src="https://blueimp.github.io/JavaScript-Load-Image/js/load-image.all.min.js"></script>
 
 330     <!-- The Canvas to Blob plugin is included for image resizing functionality -->
 
 331     <script src="https://blueimp.github.io/JavaScript-Canvas-to-Blob/js/canvas-to-blob.min.js"></script>
 
 332     <!-- blueimp Gallery script -->
 
 333     <script src="https://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
 
 334     <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
 
 335     <script src="js/jquery.iframe-transport.js"></script>
 
 336     <!-- The basic File Upload plugin -->
 
 337     <script src="js/jquery.fileupload.js"></script>
 
 338     <!-- The File Upload processing plugin -->
 
 339     <script src="js/jquery.fileupload-process.js"></script>
 
 340     <!-- The File Upload image preview & resize plugin -->
 
 341     <script src="js/jquery.fileupload-image.js"></script>
 
 342     <!-- The File Upload audio preview plugin -->
 
 343     <script src="js/jquery.fileupload-audio.js"></script>
 
 344     <!-- The File Upload video preview plugin -->
 
 345     <script src="js/jquery.fileupload-video.js"></script>
 
 346     <!-- The File Upload validation plugin -->
 
 347     <script src="js/jquery.fileupload-validate.js"></script>
 
 348     <!-- The File Upload user interface plugin -->
 
 349     <script src="js/jquery.fileupload-ui.js"></script>
 
 350     <!-- The main application script -->
 
 351     <script src="js/demo.js"></script>
 
 352     <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
 
 353     <!--[if (gte IE 8)&(lt IE 10)]>
 
 354       <script src="js/cors/jquery.xdr-transport.js"></script>