Elixir binding to tree_magic for fetching MIME information from files and binary data.
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/bonfire-networks/tree_magic.ex"}
]
end
See documentation for more information.
iex> TreeMagic.from_filepath("image.png")
"image/png"
iex> TreeMagic.from_u8(charlist)
"image/png"
LGPLv3 License, see LICENSE.