Mime type detection in ruby via file extension or file content
Ruby
Pull request Compare This branch is 65 commits behind minad:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
script
test
LICENSE
Manifest.txt
README
Rakefile
mimemagic.gemspec

README

MimeMagic is a library to detect the mime type of a file by extension or by content.

Usage
=====

   require 'mimemagic'
   MimeMagic.by_extension('html').text?
   MimeMagic.by_extension('.html').child_of? 'text/plain'
   MimeMagic.by_path('filename.txt')
   MimeMagic.by_magic(File.open('test.html'))
   etc...

Authors
=======

Daniel Mendler