File uploads is something that is used in Web Applications all of the time. It is becoming somewhat of a “standard” feature in many applications. When using rails, there are a number of ways that this feature can be achieved. Originally, I used attachment_fu and followed a tutorial (which I have since lost) that described how to perform multi-file uploads. This worked wonders. However, attachment_fu has somewhat fallen behind, or perhaps is no longer even supported. I have since started using Paperclip, as it seems to be the most common file upload plugin used for Rails and is very well supported.
The second element of this tutorial is jQuery. jQuery is one of the most popular javascript library’s that is used on the web. Furthermore, it is even easier to use with rails since the upgrade to Rails 3 and the release of the jquery-ujs gem. It only seems natural that someone would want to use Paperclip and jQuery together, and this tutorial shows you how.