Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Replacing default bulk image uploading with an Ajaxy, one by one, upload method to prevent timeouts
Branch: master

Merge pull request #4 from bryanmtl/master

Properly reload the image modal for the various scenarios
latest commit 3333130380
@robyurkowski robyurkowski authored
Failed to load latest commit information.
app Reloads the image picker when uploading images to a collection (portf…
config 1.8 style hash for routes
lib initial import
spec initial import
tasks initial import
.gitignore initial import
.travis.yml remove duplicated database creation
Gemfile initial import
Gemfile.lock initial import
Guardfile initial import modified install section of README
Rakefile default rake task
refinerycms-imajax.gemspec Update gemspec for edge.

refinerycms-imajax: extension for Refinery CMS.

This is a small and simple extension that replaces the default behavior for image uploading in Refinery CMS. By default, all images are uploaded on a single form post. That can lead to timeouts on Heroku (to name one) if you upload too many files at once. What refinerycms-imajax does is simply uploading the files one by one. It will only work with modern browsers that supports FileList and FormData (Chrome is one that supports those) but it will fallback to default behavior.


You are expected to have a Rails project with Refinery 2 (>= 2.0.0 but only tested with 2.0.2).


Add refinerycms-imajax to your Gemfile:

gem 'refinerycms-imajax'


$ bundle install
$ rails s

It should now work!


  • Set valid file types based on image model validation (in Images::validate from
  • Manage locales and remove hard coded messages
  • Add a progress bar for each file maybe?
  • Setup TravisCI to test over multiple Ruby, Rails and Refinery versions
  • Fix Capybara so that it can test multiple file uploads


There is only one request spec actually which is a copy of the refinerycms-images gem. Why? It is not currently possible to test multiple file uploads with Capybara:

Run tests

  1. You need a dummy app first:

    $ bundle exec rake refinery:testing:dummy_app
  2. Run tests:

    $ bundle exec rake
Something went wrong with that request. Please try again.