John Nunemaker posted a great article on using uploadify with rails.
Uploadify is a sweet jquery plugin that lets you do multiple file upload with progress indicators and everything, using the magic of flash.
But you know that magic always comes with a price. Specifically: flash sucks. It sucks in part because it doesn’t let you send cookies back with your request. John’s post showed you a way around that.
But it also sucks because it doesn’t send HTTP request headers either. Which means no RJS, kiddies. Unless you use a workaround like so.
In your middleware:
Now, bingo! You can just use responds_to like normal.