https://github.com/tkf/mimefileextensions.jl
https://github.com/tkf/mimefileextensions.jl
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tkf/mimefileextensions.jl
- Owner: tkf
- License: mit
- Created: 2022-03-14T06:55:17.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T05:22:07.000Z (almost 4 years ago)
- Last Synced: 2025-03-02T16:04:54.594Z (11 months ago)
- Language: Julia
- Size: 31.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MIMEFileExtensions
Lookup MIME types from a file extension and vice versa.
This is based on the mapping in Apache HTTP server project:
https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
## Example
```julia
julia> using MIMEFileExtensions
julia> fileexts_from_mime("image/jpeg")
3-element Vector{Symbol}:
:jpeg
:jpg
:jpe
julia> mimes_from_fileext("txt")
1-element Vector{Symbol}:
Symbol("text/plain")
```
## See also
* https://github.com/fonsp/MIMEs.jl: Similar package that is based on a more comprehensive
database.
* https://github.com/JuliaIO/FileType.jl: File type (including MIME) detection based also on
the file content.