1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <!-- example taken from git://github.com/drogus/jquery-upload-progress -->
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <title>ajaxFileUpload</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8 <script src="/javascripts/jquery.js"></script>
9 <script src="/javascripts/jquery.uploadProgress.js"></script>
10 <script type="text/javascript">
12 $('form').uploadProgress({
13 /* scripts locations for safari */
14 jqueryPath: "/javascripts/jquery.js",
15 uploadProgressPath: "/javascripts/jquery.uploadProgress.js",
17 uploading: function(upload) {$('#percents').html(upload.percents+'%');},
22 <style type="text/css">
29 border: 1px solid #222;
41 <% if flash[:notice] %>
42 <h1><%= flash[:notice] %></h1>
44 <form id="upload" enctype="multipart/form-data" action="/files/new" method="post">
45 <input name="data" type="file"/>
46 <input type="submit" value="Upload"/>
50 <div id="progress" class="bar">
51 <div id="progressbar"> </div>
54 <div id="percents"></div>