Reputation:
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
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
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
Reputation: 6436
SWFUpload is a common tool for Ajaxy uploads.
Here are a couple links that should integration with Rails.
http://blog.airbladesoftware.com/2007/8/8/uploading-files-with-swfupload
Upvotes: 1
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_paren
t plugin adds some helpful functionality to then execute success or failure javascript in the context of the main page.
Upvotes: 0