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