paul
paul

Reputation:

Rails Ajaxy File Upload

Is there a defacto way of doing an Ajaxy file upload in Rails? (I say "Ajaxy" because it can't really use XHR). I've read about various approaches and plugins. Wondering what's the cleanest/most approved of by the community.

Thanks!

Upvotes: 1

Views: 498

Answers (4)

whitehat101
whitehat101

Reputation: 2549

I've had a good time with Plupload. There is a plupload-rails gem (I don't trust the plupload-rails3, it's too automated, but might be fine). It offers several runtimes (html5,html4,flash,silverlight,gears,...) and they can be setup as fallbacks for each other, so you can support all clients no matter if they have silverlight or flash or even if they use internet explorer.

jQuery-File-Upload looked nice, and I almost used it in mu last project, but I had a very hard time getting it to play nicely with Internet Explorer. (I was also using Amazon S3, which complicated things)

I just saw the date, I hope new comers find this useful.

Upvotes: 0

Michal
Michal

Reputation: 618

If you dont want the uploader bases on flash, you can check http://blueimp.github.com/jQuery-File-Upload/ its pretty cool.

Upvotes: 1

Ian Terrell
Ian Terrell

Reputation: 10876

I've used responds_to_parent with success on several projects.

The idea is that you're doing a full POST to an iframe embedded on the page. The responds_to_parent plugin adds some helpful functionality to then execute success or failure javascript in the context of the main page.

Upvotes: 0

Related Questions