Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Integration of Plupload with the Rails 3.x asset pipeline
Ruby
Branch: master
Pull request Compare This branch is 2 commits ahead, 30 commits behind gucki:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app/assets/javascripts
lib
vendor/assets
.gitignore
Gemfile
README.md
Rakefile
plupload-rails.gemspec

README.md

Rails 3.x Integration for Plupload

This gem integrates Plupload with the Rails 3.x asset pipeline. It's been tested with Rails 3.1 and 3.2.

Install

Just add it got your Gemfile:

gem plupload-rails

Quick Start

Add to your application.js:

//= require plupload

// optional, only needed if you'd like to use plupload localized
//= require plupload/i18n/de

// optional, but recommended. it sets generic settings like flash url, etc.
//= require plupload.settings     

// optional, only if you want to use the jquery integration
//= require jquery.plupload.queue 

// optional, choose the ones you'd like to use
//= require plupload.flash        
//= require plupload.silverlight  
//= require plupload.html4        
//= require plupload.html5        
//= require plupload.gears        
//= require plupload.browserplus

Add to your application.scss:

@import "jquery.plupload.queue";

Simple example haml for your views:

div#uploader
javascript:
  $(function(){
    $("#uploader").pluploadQueue({
      runtimes: 'gears,flash,silverlight,browserplus,html5',
      url: '#{images_path}',
      multipart_params: {
        '#{request_forgery_protection_token}': '#{form_authenticity_token}',
        '#{request.session_options[:key]}': '#{request.session_options[:id]}'
      }
    });
  });

Updating

When new versions of Plupload are released, simply update the gem to the latest version. When you notice that there's no gem for the latest plupload, please contact me (or even better, create an issue/ pull request).

Something went wrong with that request. Please try again.