Forum: Ruby on Rails "AJAX" file uploading

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9046f1681dc8375fd81b34799d5abd36?d=identicon&s=25 Jeff Smick (sprsquish)
on 2006-01-27 23:56
I'm pretty new to actually contributing to a software project outside of
my own. I recently found the need to create an "ajax" uploader and
thought I'd share it with the community.

I write "ajax" because it acts like it's ajax but we all know that
javascript does not have filesystem access (for good reason) and thus
ajax uploading isn't possible in the standard sense. This uses a
technique borrowed from a Drupal module where by the form is targeted to
a hidden iframe. The response gets wrapped just before being sent. The
wrapper is essentially a javascript call that collects the response and
sends it to a callback in the parent window where it can be processed in
the normal prototype ways (insertion and such).

Please take a look. I didn't write any documentation for it (yet), but
it's fairly self explanitory for those that have been using Rails for
awhile. It's also very basic.

http://rubyforge.org/projects/ajax-upload/


BTW, if anyone would like to assist me on how to write better software
I'd be most appreciative.
This topic is locked and can not be replied to.