Browse Source

Update mimetypes

Loïc Hoguin 8 years ago
parent
commit
25185cf014
2 changed files with 5 additions and 4 deletions
  1. 2 1
      src/cow_mimetypes.erl
  2. 3 3
      src/cow_mimetypes.erl.src

+ 2 - 1
src/cow_mimetypes.erl

@@ -1,4 +1,4 @@
-%% Copyright (c) 2013-2015, Loïc Hoguin <essen@ninenines.eu>
+%% Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
 %%
 %% 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">>, []};

+ 3 - 3
src/cow_mimetypes.erl.src

@@ -1,4 +1,4 @@
-%% Copyright (c) 2013-2014, Loïc Hoguin <essen@ninenines.eu>
+%% Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
 %%
 %% 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">>, []};