Last Updated: February 25, 2016
·
1.803K
· taybenlor

Simple async files in Rails 3+

I've gone through multitudes of different methods for getting asynchronous file uploads to work nicely in Rails. The most painful being my own JS implementation of XHR uploads + iframe fallback for Rails 2.

Today I discovered Remotipart which solves a lot of problems. It's a nice plug & play solution. Include the gem in your gemfile, throw a line in your asset manifest and you're done.

I'm disappointed that the best I can find is iframe based, but it works so I can stop caring and move along.

That gem again is Remotipart.

2 Responses
Add your response

Cool. I've always found file uploads a burden to get right...started using the Chute API for photo uploads, it works great. There is also filepicker.io that handles other types of media.

over 1 year ago ·

@mdeiters It's a really frustrating area. I've also meddled with direct-to-s3 flash uploading. In this case I wanted something quick and simple for an internal app. Though hilariously I spent about 3 hours trying different solutions until I decided on this.

Chute looks interesting and relevant to a project I have coming up, will have a play.

over 1 year ago ·