TreeMagic Elixir

CircleCI

Elixir binding to tree_magic for fetching MIME information from files and binary data.

Installation

Recommended installation is through Hex:

# mix.exs

defp dependencies() do
  [
    {:tree_magic, "~> 0.1.0"}
  ]
end

To use the latest development version:

# mix.exs

defp dependencies() do
  [
    {:tree_magic, git: "https://github.com/commonspub/tree_magic.ex"}
  ]
end

Quickstart

See documentation for more information.

iex> TreeMagic.from_filepath("image.png")
"image/png"
iex> TreeMagic.from_u8(charlist)
"image/png"

License

LGPLv3 License, see LICENSE.