Skip to content
This repository was archived by the owner on Jan 26, 2025. It is now read-only.

Commit 27c8137

Browse files
committed
Edited README.md via GitHub
1 parent acd38f7 commit 27c8137

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,18 @@ Options can be:
2626
* :max_file_size => An integer indicating the number of megabytes to allow. Defaults to 10.
2727
* :filters => An array of hashes with :title and :extension keys specifying the files to look for. Defaults to [], which will show all files.
2828
* :pluploader => a value of `true` indicates that you want to have the files submitted with your form instead of in individual requests. To make this work, you need to add `match 'plupload_rails/_plupload_uploader', :controller=>'plupload_rails', :action=>'_plupload_uploader', :as=>'pluploader'` to your config/routes.rb file so plupload can upload the files, and then this plugin will insert some extra form fields into your page via JavaScript. Those fields tell the middleware how to form the request parameters before they get to your controller.
29+
* :field_name => the name of the field, which defaults to model_name[method_name]
2930

3031
Example filter:
3132

3233
:filters=>[{:title=>'Images', :extensions=>'jpg,gif,png'},{:title=>'PDF', :extensions=>'pdf'}])
3334

34-
Example of using the pluploader instead of your controller:
3535

36-
<%= plupload([@album, @album.photos], :photos, {:plupload_container=>'uploader', :pluploader=>true}) %>
36+
Note: Most of the plupload code in lib/app/views/plupload/_uploader_scripts.html.erb is from http://www.theroamingcoder.com/node/50, where I learned how to use Plupload with Rails.
3737

38-
The plupload code in lib/app/views/plupload/_uploader_scripts.html.erb is from http://www.theroamingcoder.com/node/50, where I learned how to use Plupload with Rails.
3938

40-
41-
Example
42-
=======
39+
Example 1: Uploading the files hitting the action once for each file
40+
====================================================================
4341

4442
In your view:
4543

0 commit comments

Comments
 (0)