diff options
author | Loïc Hoguin <[email protected]> | 2016-10-03 23:27:30 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-10-03 23:29:09 +0200 |
commit | 25185cf0140abe6414574ee0a16082d28330e880 (patch) | |
tree | 153ca865976623458d3fb4aa64a214a4b91bcaa0 | |
parent | 6d49739f96b97bb5c1abd6274490d9a9d0a9394b (diff) | |
download | cowlib-25185cf0140abe6414574ee0a16082d28330e880.tar.gz cowlib-25185cf0140abe6414574ee0a16082d28330e880.tar.bz2 cowlib-25185cf0140abe6414574ee0a16082d28330e880.zip |
Update mimetypes
-rw-r--r-- | src/cow_mimetypes.erl | 3 | ||||
-rw-r--r-- | src/cow_mimetypes.erl.src | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/cow_mimetypes.erl b/src/cow_mimetypes.erl index 58585b9..f572fd9 100644 --- a/src/cow_mimetypes.erl +++ b/src/cow_mimetypes.erl @@ -1,4 +1,4 @@ -%% Copyright (c) 2013-2015, Loïc Hoguin <[email protected]> +%% Copyright (c) 2013-2016, Loïc Hoguin <[email protected]> %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above @@ -444,6 +444,7 @@ all_ext(<<"m2v">>) -> {<<"video">>, <<"mpeg">>, []}; all_ext(<<"m3a">>) -> {<<"audio">>, <<"mpeg">>, []}; all_ext(<<"m3u8">>) -> {<<"application">>, <<"vnd.apple.mpegurl">>, []}; all_ext(<<"m3u">>) -> {<<"audio">>, <<"x-mpegurl">>, []}; +all_ext(<<"m4a">>) -> {<<"audio">>, <<"mp4">>, []}; all_ext(<<"m4u">>) -> {<<"video">>, <<"vnd.mpegurl">>, []}; all_ext(<<"m4v">>) -> {<<"video">>, <<"x-m4v">>, []}; all_ext(<<"ma">>) -> {<<"application">>, <<"mathematica">>, []}; diff --git a/src/cow_mimetypes.erl.src b/src/cow_mimetypes.erl.src index cf79b5b..a9952f2 100644 --- a/src/cow_mimetypes.erl.src +++ b/src/cow_mimetypes.erl.src @@ -1,4 +1,4 @@ -%% Copyright (c) 2013-2014, Loïc Hoguin <[email protected]> +%% Copyright (c) 2013-2016, Loïc Hoguin <[email protected]> %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above @@ -19,7 +19,7 @@ %% @doc Return the mimetype for any file by looking at its extension. --spec all(file:filename_all()) -> {binary(), binary(), []}. +-spec all(binary()) -> {binary(), binary(), []}. all(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; @@ -28,7 +28,7 @@ all(Path) -> %% @doc Return the mimetype for a Web related file by looking at its extension. --spec web(file:filename_all()) -> {binary(), binary(), []}. +-spec web(binary()) -> {binary(), binary(), []}. web(Path) -> case filename:extension(Path) of <<>> -> {<<"application">>, <<"octet-stream">>, []}; |