<commit_before>= 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.

http://www.uploadify.com

http://jquery.com

http://jqueryui.com

http://github.com/alainbloch/uploadify_rails

== Installation

First, the script/plugin installer should've added the supported uploadify js library and
it's dependency (swfobject.js). You'll need to have JQuery and JQueryUI already installed.

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:

  ActionController::Dispatcher.middleware.insert_before(
    ActionController::Session::CookieStore, 
    FlashSessionCookieMiddleware, # <-- here is where it goes!
    ActionController::Base.session_options[:key]
    )

== Caveat Flash

Flash doesn't send the MIME type in the octet stream when uploading. You'll need to use
something like the mime-types gem in order to set the MIME type of the file correctly.

To install the mime-types gem do the following:

  sudo gem install mime-types

Then in the environment.rb add this to initializer config:

  config.gem 'mime-types',  :lib => "mime/types"

Finally, either in some sort of Model callback or within the controller method you're using 
to create the file, make sure to set the MIME type using the filename. For example:
<commit_msg>revised README to include the paths to the files to be manually modified.<commit_after>= 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.

http://www.uploadify.com

http://jquery.com

http://jqueryui.com

http://github.com/alainbloch/uploadify_rails

== Installation

First, the script/plugin installer should've added the supported uploadify js library and
it's dependency (swfobject.js). You'll need to have JQuery and JQueryUI already installed.

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:
  # config/initializers/session_store.rb
  
  ActionController::Base.session = {
    :key         => '_uploadify_rails_session',
    :secret      => 'woot!'
  }
  
  ActionController::Dispatcher.middleware.insert_before(
    ActionController::Session::CookieStore, 
    FlashSessionCookieMiddleware, # <-- here is where it goes!
    ActionController::Base.session_options[:key]
    )

== Caveat Flash

Flash doesn't send the MIME type in the octet stream when uploading. You'll need to use
something like the mime-types gem in order to set the MIME type of the file correctly.

To install the mime-types gem do the following:

  sudo gem install mime-types

Then in the environment.rb add this to initializer config:
  # config/environment.rb
  
  config.gem 'mime-types',  :lib => "mime/types"

Finally, either in some sort of Model callback or within the controller method you're using 
to create the file, make sure to set the MIME type using the filename. For example:

{'fraction_non_alphanumeric': 0.05579302587176603, 'fraction_numerical': 0.0, 'mean_word_length': 4.448529411764706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1911042', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1134, 'n_words': 569}