From: Daniel Greig Date: 2006-08-11T16:38:07+09:00 Subject: Re: Getting a files mime-type Daniel Greig wrote: > Hi, > > Can anyone tell me if there is a simple way to get the mime-type of a > file? > (I've seen the Mime::Type library, but haven't figured out how to use > it). > I'm trying to check the type before processing a bunch of files on disk > (and ignoring files that I'm not interested in. Is there a better way > than using the file extension? > > thanks, > Dan oops, content_type/mime_type is available when a file is transfered via the web, but it seems not from disk. It was a rails function I was thinking of (content_type) for uploaded files. my bad... -- Posted via http://www.ruby-forum.com/.