Content_type from a local file?

I’m using a Rake task to add local files into a database designed for
use with attachment_fu.

http://eldorado.googlecode.com/svn/trunk/db/migrate/039_create_avatars.rb
http://eldorado.googlecode.com/svn/trunk/lib/tasks/import_files.rake

So, attachment_fu has a “content_type” field, which apparently is
receiving that information from the browser…?

I’m trying to figure out if there is a way to get the content_type of a
file (e.g. ‘image/png’) that you’ve already got in your file-system. I
can’t find anything about this in the Pickaxe, or by looking at the
attachment_fu plugin.

Any help very much appreciated!

read the following post:

http://www.railsweenie.com/users/2237/posts

contains information about using the mime-types plugin to determine
content_type outside of the CGI library

Mike

Terrific. Thanks very much!