UploadColumn is a plugin for the Ruby on Rails framework that enables easy uploading of files, especially images. Suppose you have a list of users, and you would like to associate a picture to each of them. You could upload the image to a database, or you could use upload_column for simple storage to the file system.
Really flexible storage paths
UploadColumn gives you full control over where your files are stored. Want to store them by the record's name? No problem! Want to store them by an associated record's name? Easy as pie! Want to store them in one giant directory bursting at the seams? Absolutely no problem!
Works across form redisplays
Can't get uploads and validations to play nice? No problem, because UploadColumn keeps your uploaded files even if you need to redisplay a form multiple times!
Easily create multiple versions of the same file
Whatever you want to do with your file, maybe it's an XML document you want to transform with XSLT (but keep the original), or maybe you just want a thumbnail for your image, often you need different versions of the same file. UploadColumn makes creating and using those versions easy. With the new manipulator framework, it's very easy to create a reusable manipulator to do the same kind of manipulations across your application.
Awesome RMagick and ImageScience integration
UploadColumn makes it extremely easy to create thumbnails (or other sizes) of your images, even to crop them to an exact size, so they always look their best. Now you can choose to use the fast and light ImageScience library. If you choose to use RMagick, you'll not only get thumbnails, but access to the entire library and apply any effect to images automatically after they're uploaded!
Well tested and stable
UploadColumn is extensively tested with the RSpec testing framework. We currently have 100% C0 coverage, all passing specs, and heckling passes without complaints.
What's New in This Release:
· Complete rewrite, maintaining most of the legacy API
· Framework for custom manipulators, for clean and easy extension.
· Manipulate images with ImageScience instead of RMagick if you want
· Support for animated GIFs in the RMagick manipulator
· Fully tested with RSpec
· Following the law of Demeter better by adding _public_path, _thumb, _thumb_public_path etc... magic methods.
· UploadedFile#url is deprecated in favour of UploadedFile#public_path and will be removed in the next major release
· Store dir and temp dir procs now take two piped variables, the UploadedFile object and the ActiveRecord
· the :root_path option is now called :root_dir
· web_root must now be set with a leading slash if an absolute URL is desired and no trailing slash.
· UploadedFile#filename_base is removed in favor of #basename
· UploadedFile#filename_extension is removed in favor of #extension
· UploadedFile#mime_type is removed in favor of #content_type
· _store_dir and _tmp_dir callbacks now take the file object as an argument, which means that the methods always MUST take an argument, even if you don't need it.
· The _after_assigns callback has changed name to _after_upload and take the UploadedFile as param.
· Support for the exif columns, as in 0.2.X has been removed temporarily. It might be readded later.
· The old_files option as in 0.2.X has been removed. All old files are now stored. This option will be reintroduced in later versions of 0.3.X
· The :force_format option for image_columns as in 0.2.X has been removed and will be reintroduced later.
· The remote_upload_form helper has been removed, for encouraging bad JS practice. It will not be readded. If you need remote uploads, uploading with Flash is much cooler, and can be done in an unobtrusive way. Check out Swiff.js for hints.
· The 'image' helper has been removed, since its functionality is not really useful in any app (hopefully most apps) that uses named routes.