Skip to content
Integration of Plupload with the Rails asset pipeline
Latest commit 00690cd Feb 18, 2016 @gucki Merge pull request #33 from eltiare/master
Update to latest version of plupload.
Failed to load latest commit information.
app/assets/javascripts Fix exception when using plupload.settings.js Feb 8, 2014
lib Bumped version to 1.2.1 Feb 8, 2014
GPL-LICENSE.txt Adds licenses Sep 26, 2013
Gemfile first commit Oct 4, 2011
MIT-LICENSE.txt Adds licenses Sep 26, 2013 Update Sep 28, 2014

Rails Integration for Plupload

This gem integrates Plupload with Rails. It's been tested with Rails 3.1, 3.2 and 4.0.


Just add it got your Gemfile:

gem 'plupload-rails'

Quick Start

Add to your application.js:

//= require moxie
//= require

// 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

Add to your application stylesheet:

//= require jquery.plupload.queue

For Rails 4, add to config/initializors/assets.rb:

Rails.application.config.assets.precompile += %w( Moxie.swf Moxie.xap )

Simple example Haml for your views:

      runtimes: 'gears,flash,silverlight,browserplus,html5',
      url: '#{images_path}',
      multipart_params: {
        '#{request_forgery_protection_token}': '#{form_authenticity_token}',
        '#{Rails.application.config.session_options[:key]}': '#{request.session_options[:id]}'

And the same in ERB:

      runtimes: 'html5,flash,silverlight',
      url: '<%= sink_hole_path %>',
      multipart_params: {
        '<%= request_forgery_protection_token %>': '<%= form_authenticity_token %>',
        '<%= Rails.application.config.session_options[:key] %>': '<%= request.session_options[:id] %>'


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).


Dual licensed under the GPLv2 license and the MIT license. Plupload itself (including the JS, CSS, images, the Silverlight and Flash components) is licensed under GPLv2, unless you have acquired a commercial license.

Copyright © 2011-2013 Corin Langosch and contributors

Something went wrong with that request. Please try again.