hasimo / mimemagic

Mime type detection in ruby via file extension or file content

Home Page:http://rdoc.info/github/minad/mimemagic/frames/file/README

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Build StatusCode Climate

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...

API

http://rdoc.info/github/minad/mimemagic/frames/file/README

Authors

Daniel Mendler

About

Mime type detection in ruby via file extension or file content

http://rdoc.info/github/minad/mimemagic/frames/file/README

License:MIT License


Languages

Language:Ruby 100.0%