uploader 0.1.3 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/README.rdoc +81 -33
  2. data/Rakefile +2 -2
  3. data/TODO +2 -1
  4. data/VERSION +1 -1
  5. data/app/controllers/uploader/uploads_controller.rb +13 -9
  6. data/app/views/uploads/_swf_upload.html.erb +1 -1
  7. data/lib/active_record/acts/uploader_upload.rb +12 -13
  8. data/lib/daemons/amazonaws.rb +36 -0
  9. data/lib/uploader/tasks.rb +9 -3
  10. data/public/images/file_icons/excel.gif +0 -0
  11. data/public/images/file_icons/file.gif +0 -0
  12. data/public/images/file_icons/file.png +0 -0
  13. data/public/images/file_icons/file_aac.gif +0 -0
  14. data/public/images/file_icons/file_ai.gif +0 -0
  15. data/public/images/file_icons/file_avi.gif +0 -0
  16. data/public/images/file_icons/file_bin.gif +0 -0
  17. data/public/images/file_icons/file_bmp.gif +0 -0
  18. data/public/images/file_icons/file_cue.gif +0 -0
  19. data/public/images/file_icons/file_divx.gif +0 -0
  20. data/public/images/file_icons/file_doc.gif +0 -0
  21. data/public/images/file_icons/file_eps.gif +0 -0
  22. data/public/images/file_icons/file_flac.gif +0 -0
  23. data/public/images/file_icons/file_flv.gif +0 -0
  24. data/public/images/file_icons/file_gif.gif +0 -0
  25. data/public/images/file_icons/file_html.gif +0 -0
  26. data/public/images/file_icons/file_ical.gif +0 -0
  27. data/public/images/file_icons/file_indd.gif +0 -0
  28. data/public/images/file_icons/file_inx.gif +0 -0
  29. data/public/images/file_icons/file_iso.gif +0 -0
  30. data/public/images/file_icons/file_jpg.gif +0 -0
  31. data/public/images/file_icons/file_mov.gif +0 -0
  32. data/public/images/file_icons/file_mp3.gif +0 -0
  33. data/public/images/file_icons/file_mpg.gif +0 -0
  34. data/public/images/file_icons/file_pdf.gif +0 -0
  35. data/public/images/file_icons/file_php.gif +0 -0
  36. data/public/images/file_icons/file_png.gif +0 -0
  37. data/public/images/file_icons/file_pps.gif +0 -0
  38. data/public/images/file_icons/file_ppt.gif +0 -0
  39. data/public/images/file_icons/file_psd.gif +0 -0
  40. data/public/images/file_icons/file_qxd.gif +0 -0
  41. data/public/images/file_icons/file_qxp.gif +0 -0
  42. data/public/images/file_icons/file_raw.gif +0 -0
  43. data/public/images/file_icons/file_rtf.gif +0 -0
  44. data/public/images/file_icons/file_svg.gif +0 -0
  45. data/public/images/file_icons/file_tif.gif +0 -0
  46. data/public/images/file_icons/file_txt.gif +0 -0
  47. data/public/images/file_icons/file_vcf.gif +0 -0
  48. data/public/images/file_icons/file_wav.gif +0 -0
  49. data/public/images/file_icons/file_wma.gif +0 -0
  50. data/public/images/file_icons/file_xls.gif +0 -0
  51. data/public/images/file_icons/file_xml.gif +0 -0
  52. data/public/images/file_icons/pdf.gif +0 -0
  53. data/public/images/file_icons/pdf.png +0 -0
  54. data/public/images/file_icons/text.gif +0 -0
  55. data/public/images/file_icons/text.png +0 -0
  56. data/rdoc/classes/ActionController/Routing/RouteSet.html +148 -0
  57. data/rdoc/classes/ActionController/Routing.html +107 -0
  58. data/rdoc/classes/ActionController.html +107 -0
  59. data/rdoc/classes/ActiveRecord/Acts/UploaderUpload/ClassMethods.html +188 -0
  60. data/rdoc/classes/ActiveRecord/Acts/UploaderUpload/InstanceMethods.html +750 -0
  61. data/rdoc/classes/ActiveRecord/Acts/UploaderUpload/SingletonMethods.html +111 -0
  62. data/rdoc/classes/ActiveRecord.html +105 -0
  63. data/rdoc/classes/Uploader/Exceptions/MissingTemplateError.html +111 -0
  64. data/rdoc/classes/Uploader/Exceptions.html +111 -0
  65. data/rdoc/classes/Uploader/FlashSessionCookieMiddleware.html +177 -0
  66. data/rdoc/classes/Uploader/MimeTypeGroups.html +143 -0
  67. data/rdoc/classes/Uploader/Tasks.html +146 -0
  68. data/rdoc/classes/Uploader.html +126 -0
  69. data/rdoc/created.rid +1 -0
  70. data/rdoc/files/README_rdoc.html +427 -0
  71. data/rdoc/files/lib/active_record/acts/uploader_upload_rb.html +101 -0
  72. data/rdoc/files/lib/uploader/exceptions_rb.html +101 -0
  73. data/rdoc/files/lib/uploader/initialize_routes_rb.html +101 -0
  74. data/rdoc/files/lib/uploader/middleware/flash_session_cookie_middleware_rb.html +108 -0
  75. data/rdoc/files/lib/uploader/mime_type_groups_rb.html +101 -0
  76. data/rdoc/files/lib/uploader/tasks_rb.html +110 -0
  77. data/rdoc/files/lib/uploader_rb.html +112 -0
  78. data/rdoc/fr_class_index.html +39 -0
  79. data/rdoc/fr_file_index.html +34 -0
  80. data/rdoc/fr_method_index.html +54 -0
  81. data/rdoc/index.html +24 -0
  82. data/rdoc/rdoc-style.css +208 -0
  83. data/uploader.gemspec +72 -20
  84. metadata +72 -5
  85. data/pkg/uploader-0.1.0.gem +0 -0
  86. data/pkg/uploader-0.1.1.gem +0 -0
  87. data/pkg/uploader-0.1.2.gem +0 -0
@@ -0,0 +1,427 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: README.rdoc</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>README.rdoc</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>README.rdoc
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Fri May 22 14:12:09 -0600 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+ <div id="description">
72
+ <h1><a href="../classes/Uploader.html">Uploader</a></h1>
73
+ <p>
74
+ <a href="../classes/Uploader.html">Uploader</a> makes it easy to integrate
75
+ multiple file uploads into your application using SWFUpload
76
+ </p>
77
+ <h2>Installation</h2>
78
+ <h3>Install Dependancies:</h3>
79
+ <p>
80
+ sudo gem install mime-types
81
+ </p>
82
+ <h3>Install the gem:</h3>
83
+ <p>
84
+ sudo gem install uploader
85
+ </p>
86
+ <h3>Add the gem to environment.rb</h3>
87
+ <p>
88
+ config.gem &#8216;uploader&#8216;
89
+ </p>
90
+ <h3>Create a model for uploads.</h3>
91
+ <p>
92
+ We recommend creating a model called upload.rb. acts_as_uploader accepts
93
+ all valid options for paperclip via :has_attached_file =&gt; {}
94
+ </p>
95
+ <pre>
96
+ class Upload &lt; ActiveRecord::Base
97
+ acts_as_uploader :enable_s3 =&gt; false,
98
+ :has_attached_file =&gt; {
99
+ :url =&gt; &quot;/system/:attachment/:id_partition/:style/:basename.:extension&quot;,
100
+ :path =&gt; &quot;:rails_root/public/system/:attachment/:id_partition/:style/:basename.:extension&quot;,
101
+ :styles =&gt; { :icon =&gt; &quot;30x30!&quot;,
102
+ :thumb =&gt; &quot;100&gt;&quot;,
103
+ :small =&gt; &quot;150&gt;&quot;,
104
+ :medium =&gt; &quot;300&gt;&quot;,
105
+ :large =&gt; &quot;660&gt;&quot;},
106
+ :default_url =&gt; &quot;/images/profile_default.jpg&quot;,
107
+ :storage =&gt; :s3,
108
+ :s3_credentials =&gt; File.join(RAILS_ROOT, 'config', 's3.yml'),
109
+ :bucket =&gt; &quot;assets.#{SITE[:domain]}&quot;,
110
+ :s3_host_alias =&gt; &quot;assets.#{SITE[:domain]}&quot;,
111
+ :convert_options =&gt; {
112
+ :all =&gt; '-quality 80'
113
+ }
114
+
115
+ # only allow images:
116
+ # validates_attachment_content_type :file, :content_type =&gt; ['image/jpeg', 'image/pjpeg', 'image/jpg']
117
+
118
+ # The following method is implemented in 'acts_as_uploader'. This is the method destroy will check to see if
119
+ # the user has permission to delete the object. Add additional logic as needed or if the existing logic
120
+ # looks fine then feel free to delete this comment and the can_edit? method.
121
+ def can_edit?(check_user)
122
+ return false if user.blank?
123
+ check_user == self.user
124
+ end
125
+
126
+ end
127
+ </pre>
128
+ <h3>Add multiple file uploads to one of your models</h3>
129
+ <p>
130
+ Your uploads will need a parent object to attach to. For example, a user
131
+ might have many files:
132
+ </p>
133
+ <pre>
134
+ class User &lt; ActiveRecord::Base
135
+ has_many :uploads, :as =&gt; :uploadable, :order =&gt; 'created_at desc', :dependent =&gt; :destroy
136
+
137
+ def can_upload?(check_user)
138
+ self == check_user
139
+ end
140
+ end
141
+ </pre>
142
+ <p>
143
+ or a photo album might have many photos
144
+ </p>
145
+ <pre>
146
+ class PhotoAlbum &lt; ActiveRecord::Base
147
+ has_many :photos, :as =&gt; :uploadable, :order =&gt; 'created_at desc', :dependent =&gt; :destroy
148
+
149
+ def can_upload?(check_user)
150
+ self.editors.include?(check_user)
151
+ end
152
+ end
153
+ </pre>
154
+ <p>
155
+ Note that in both examples there is an implementation of
156
+ &#8216;can_upload?&#8217;. This method must be included in any parent
157
+ object and will control who has permission to upload files.
158
+ </p>
159
+ <h3>The application controller</h3>
160
+ <p>
161
+ Be sure you have turned on protect from forgery. This is required for
162
+ uploader to get the appropriate tokens from your Rails application. It is
163
+ also a good idea and is the default in new Rails applications.
164
+ </p>
165
+ <pre>
166
+ protect_from_forgery # See ActionController::RequestForgeryProtection for details
167
+ </pre>
168
+ <h3>The uploads controller</h3>
169
+ <p>
170
+ You can modify the upload controller behavior by inheriting from the
171
+ uploader controller. For example, you might want to require that users be
172
+ logged in to upload a file. There are a number of methods in the uploads
173
+ controller that contain default functionality that you may consider
174
+ overriding.
175
+ </p>
176
+ <p>
177
+ Be sure to modify your routes file. Add the following line to ensure that
178
+ your application uses the new uploads controller instead of directly using
179
+ the one inside the gem:
180
+ </p>
181
+ <pre>
182
+ map.resources :uploads, :collection =&gt; { :swfupload =&gt; :post }
183
+
184
+ class UploadsController &lt; Uploader::UploadsController
185
+
186
+ before_filter :login_required
187
+
188
+ protected
189
+
190
+ # The default 'get_upload_text' method throws an exception. You must override this method in your controller. It
191
+ # is used by the swf upload call to generate the html to be returned to the client.
192
+ # Here's an example:
193
+ def get_upload_text(upload)
194
+ render_to_string( :partial =&gt; 'uploads/upload_row', :object =&gt; upload, :locals =&gt; { :parent =&gt; @parent } )
195
+ end
196
+
197
+ # The existing method will handle most cases but you might choose a different message or a different redirect:
198
+ def permission_denied
199
+ message = t(&quot;uploader.permission_denied&quot;)
200
+ respond_to do |format|
201
+ format.html do
202
+ flash[:notice] = message
203
+ redirect_to get_redirect
204
+ end
205
+ format.js { render :text =&gt; message }
206
+ format.json { render :json =&gt; { :success =&gt; false, :message =&gt; message } }
207
+ end
208
+ end
209
+
210
+ # Simply attempts to redirect to the parent object. You might want to build something more sophisticated that
211
+ # redirect to different areas of you site depending on the type of object that was uploaded or on based on the parent.
212
+ def get_redirect
213
+ @parent
214
+ end
215
+
216
+ # The default action is to call 'can_upload?' on the parent object. Be sure to implement 'can_upload?(check_user) on
217
+ # your parent objects
218
+ def has_permission_to_upload(user, upload_parent)
219
+ upload_parent.can_upload?(user)
220
+ end
221
+
222
+ # By default the controller will use a model named 'Upload' to do a destroy. If you want to use a different model
223
+ # you'll need to override 'set_upload_for_destroy in your controller to find the object using a different object.
224
+ # For example:
225
+ def set_upload_for_destroy
226
+ @upload = Photo.find(params[:id])
227
+ end
228
+
229
+ end
230
+ </pre>
231
+ <h3>Other Methods</h3>
232
+ <p>
233
+ uploader assumes that you have a method called
234
+ &#8216;redirect_back_or_default&#8217; which is common in many Rails
235
+ projects. This method is called upon completion of destroy or created when
236
+ the requested format is &#8216;html&#8217;. A simple implementation of this
237
+ method is listed below:
238
+ </p>
239
+ <pre>
240
+ def redirect_back_or_default(default)
241
+ redirect_to(session[:return_to] || default)
242
+ session[:return_to] = nil
243
+ end
244
+ </pre>
245
+ <h3>Configure your views.</h3>
246
+ <p>
247
+ You&#8216;ll need something like this in your layout so that uploader can
248
+ add in the required css and javascript files.
249
+ </p>
250
+ <p>
251
+ &lt;%= yield :head -%&gt;
252
+ </p>
253
+ <p>
254
+ Then to add an upload form: &lt;%= upload_form(parent_object) %&gt;
255
+ parent_object should be the object which owns the uploads. ie a user,
256
+ photo_album, etc.
257
+ </p>
258
+ <h3>Rake Tasks</h3>
259
+ <p>
260
+ Add the rake tasks for uploader to your project. You will need to add the
261
+ following to your applications&#8216;s Rakefile
262
+ </p>
263
+ <pre>
264
+ require 'uploader'
265
+ require 'uploader/tasks'
266
+ </pre>
267
+ <p>
268
+ Then run:
269
+ </p>
270
+ <pre>
271
+ rake uploader:sync
272
+ </pre>
273
+ <p>
274
+ Last run:
275
+ </p>
276
+ <pre>
277
+ rake db:migrate
278
+ </pre>
279
+ <p>
280
+ This will create an uploads table for you. If you selected a different name
281
+ for your model you will need to modify the migration accordingly.
282
+ </p>
283
+ <h2>WARNING</h2>
284
+ <p>
285
+ The migration will drop any existing &#8216;uploads&#8217; table you have
286
+ in place
287
+ </p>
288
+ <p>
289
+ That will copy all the required javascript and asset files into your
290
+ project
291
+ </p>
292
+ <h2>Amazon s3</h2>
293
+ <p>
294
+ If you&#8216;d like to store your uploads on Amazon&#8216;s S3 service
295
+ there are a few extra steps involved. See the example file above to view
296
+ the options in context.
297
+ </p>
298
+ <h3>Turn on s3</h3>
299
+ <p>
300
+ Set the enable_s3 option to true in acts_as_uploader
301
+ </p>
302
+ <pre>
303
+ :enable_s3 =&gt; true
304
+ </pre>
305
+ <p>
306
+ Pass your s3 credentials into acts_as_uploader
307
+ </p>
308
+ <pre>
309
+ :has_attached_file =&gt; { :s3_credentials =&gt; File.join(RAILS_ROOT, 'config', 's3.yml') }
310
+ </pre>
311
+ <h3>Setup your credentials</h3>
312
+ <p>
313
+ Create a file named s3.yml in your configuration directory and add the
314
+ following lines:
315
+ </p>
316
+ <pre>
317
+ access_key_id: PUT YOUR KEY HERE
318
+ secret_access_key: PUT YOUR SECRET ACCESS KEY HERE
319
+ </pre>
320
+ <h3>Turn on the Daemon process</h3>
321
+ <p>
322
+ There are a number of timing issues that you will run into if you attempt
323
+ to upload files directly to s3. To overcome that problem uploader includes
324
+ a daemon process which will send the files to Amazon asynchronously. Note
325
+ that the uploader will leave your local copy in place. TODO docs for Daemon
326
+ </p>
327
+ <h2>Other Stuff</h2>
328
+ <p>
329
+ If you&#8216;d like to add an ajax delete to your uploads page this code
330
+ might come in handy.
331
+ </p>
332
+ <p>
333
+ Say you have chosen to display your upload in a table. Your code might look
334
+ like the following. Note that there are a number of assumptions made in
335
+ this code. Modify it to suite your needs.
336
+ </p>
337
+ <pre>
338
+ &lt;tr id=&quot;&lt;%= upload_row.dom_id %&gt;&quot; class=&quot;delete-container &lt;%= cycle('odd', 'even') %&gt;&quot; &lt;%=style-%&gt; &gt;
339
+ &lt;td&gt;&lt;div class=&quot;file-icon&quot;&gt;&lt;%= image_tag upload_row.icon -%&gt;&lt;/div&gt;&lt;/td&gt;
340
+ &lt;td&gt;&lt;a href=&quot;&lt;%=upload_row.file.url%&gt;&quot;&gt;&lt;%= truncate(sanitize(upload_row.file_name), 100) %&gt;&lt;/a&gt;&lt;/td&gt;
341
+ &lt;td&gt;&lt;%= upload_row.created_at.to_s(:long) -%&gt;&lt;/td&gt;
342
+ &lt;td&gt;
343
+ &lt;% if parent.can_edit?(current_user) -%&gt;
344
+ &lt;% form_for(:upload, :url =&gt; upload_path(upload_row.id), :html =&gt; { :class =&gt; &quot;delete-form&quot;, :method =&gt; :delete} ) do |f| -%&gt;
345
+ &lt;%= image_submit_tag '/images/icons/delete.png', {:id =&gt; 'submit-comment', :title =&gt; t('general.delete_file'), :class =&gt; 'submit-delete', :width =&gt; '12', :height =&gt; '12', :alt =&gt; t('general.delete_file') } %&gt;
346
+ &lt;% end -%&gt;
347
+ &lt;% if !style.empty? -%&gt;
348
+ &lt;script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;&gt;
349
+ jQuery(&quot;#&lt;%= upload_row.dom_id %&gt;&quot;).fadeIn(&quot;slow&quot;);
350
+ &lt;/script&gt;
351
+ &lt;% end -%&gt;
352
+ &lt;% end -%&gt;
353
+ &lt;/td&gt;
354
+ &lt;/tr&gt;
355
+ </pre>
356
+ <p>
357
+ I put the following in my main upload view
358
+ </p>
359
+ <pre>
360
+ &lt;% content_for :javascript do -%&gt;
361
+
362
+ setup_submit_delete();
363
+
364
+ function upload_completed_callback(data){
365
+ jQuery('#upload-list').prepend(data);
366
+ setup_submit_delete();
367
+ }
368
+ &lt;% end -%&gt;
369
+ </pre>
370
+ <p>
371
+ The following jQuery code will do an ajax delete for you
372
+ </p>
373
+ <pre>
374
+ function setup_submit_delete(){
375
+ jQuery(&quot;.submit-delete&quot;).click(function() {
376
+ // if(!confirm(&quot;Are you sure?&quot;)){
377
+ // return false;
378
+ // }
379
+ jQuery(this).parents('.delete-container').fadeOut();
380
+ var form = jQuery(this).parents('form');
381
+ jQuery.post(form.attr('action') + '.json', form.serialize(),
382
+ function(data){
383
+ var json = eval('(' + data + ')');
384
+ if(!json.success){
385
+ jQuery.jGrowl.info(json.message);
386
+ }
387
+ });
388
+ return false;
389
+ });
390
+ }
391
+ </pre>
392
+ <p>
393
+ Copyright (c) 2009 Justin Ball, released under the MIT license
394
+ </p>
395
+
396
+ </div>
397
+
398
+
399
+ </div>
400
+
401
+
402
+ </div>
403
+
404
+
405
+ <!-- if includes -->
406
+
407
+ <div id="section">
408
+
409
+
410
+
411
+
412
+
413
+
414
+
415
+
416
+ <!-- if method_list -->
417
+
418
+
419
+ </div>
420
+
421
+
422
+ <div id="validator-badges">
423
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
424
+ </div>
425
+
426
+ </body>
427
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: uploader_upload.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>uploader_upload.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/active_record/acts/uploader_upload.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Fri May 22 14:54:46 -0600 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>File: exceptions.rb</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="fileHeader">
50
+ <h1>exceptions.rb</h1>
51
+ <table class="header-table">
52
+ <tr class="top-aligned-row">
53
+ <td><strong>Path:</strong></td>
54
+ <td>lib/uploader/exceptions.rb
55
+ </td>
56
+ </tr>
57
+ <tr class="top-aligned-row">
58
+ <td><strong>Last Update:</strong></td>
59
+ <td>Sat May 16 18:36:02 -0600 2009</td>
60
+ </tr>
61
+ </table>
62
+ </div>
63
+ <!-- banner header -->
64
+
65
+ <div id="bodyContent">
66
+
67
+
68
+
69
+ <div id="contextContent">
70
+
71
+
72
+
73
+ </div>
74
+
75
+
76
+ </div>
77
+
78
+
79
+ <!-- if includes -->
80
+
81
+ <div id="section">
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <!-- if method_list -->
91
+
92
+
93
+ </div>
94
+
95
+
96
+ <div id="validator-badges">
97
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
+ </div>
99
+
100
+ </body>
101
+ </html>