file uploading using ajax

I don't think it's possible to upload files with AJAX, but there are
some workarounds with hidden iFrames. It's not very elegant, but it
works.

See this, for instance: http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/