https://github.com/bonfire-networks/tree_magic.ex
Elixir MIME type extraction using the tree_magic library
https://github.com/bonfire-networks/tree_magic.ex
elixir file mime
Last synced: 5 months ago
JSON representation
Elixir MIME type extraction using the tree_magic library
- Host: GitHub
- URL: https://github.com/bonfire-networks/tree_magic.ex
- Owner: bonfire-networks
- License: lgpl-3.0
- Created: 2019-12-18T12:22:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T12:31:27.000Z (almost 2 years ago)
- Last Synced: 2025-10-26T06:17:40.081Z (8 months ago)
- Topics: elixir, file, mime
- Language: Elixir
- Size: 32.2 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TreeMagic Elixir
[](https://circleci.com/gh/antoniskalou/tree_magic.ex)
Elixir binding to [tree_magic](https://github.com/aahancoc/tree_magic) for fetching
MIME information from files and binary data.
## Installation
Recommended installation is through Hex:
```elixir
# mix.exs
defp dependencies() do
[
{:tree_magic, "~> 0.1.0"}
]
end
```
To use the latest development version:
```elixir
# mix.exs
defp dependencies() do
[
{:tree_magic, git: "https://github.com/bonfire-networks/tree_magic.ex"}
]
end
```
## Quickstart
See documentation for more information.
```elixir
iex> TreeMagic.from_filepath("image.png")
"image/png"
iex> TreeMagic.from_u8(charlist)
"image/png"
```
## License
LGPLv3 License, see [LICENSE](LICENSE).