FileWrapper is a RubyGem and Rails plugin which wraps the command line utility 'file' to detect the mime-type of a file.
>= 1.8.0
Wes Oldenbeuving