README.rdoc

UploadifyRails

Uploadify is an javacript library to upload multiple files with neat
progress bars and such. UploadifyRails allows you to easily get Uploadify
up and going without headaches. This plugin solves the major problems in
getting Uploadify running in rails. These problems include getting the
Authentication Token and Session ID into the request sent by the flash
object. Also, the request format is set to JSON, so you can get set some
sort of response when the file(s) is properly uploaded.

Source Links

Listed below are the links to various dependencies and the github
repository of this plugin.

Installation

If the installer didn't add the files you can also run this rake task:

rake uploadify_rails:install

Next, you'll need to modify config/initializers/session_store.rb so
that it will insert the provided middleware. Modify the
ActionController::Dispatcher so that the FlashSessionCookieMiddleware is
in-between the cookie store and the base session like this:

Usage

Once installed, you'll have some nifty helper methods to easily add
Uploadify.

Use the render_uploadify method to create the uploadify js and load the
appropriate js files. You can pass in several options into this method.
You'll need to enter in at least the url of the path you're
uploading the files to, and the id of the file field you are working with.
You will also have a couple helper methods to submit the uploadify file
fields and to cancel any queued uploads.

Refer to the code for the default options and what you options you can pass
into the methods.

Example

Lets say you want to post the files to a photos controller, and you have a
file_field with an id “photo_photo”: