diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-01-15 13:14:51 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-01-15 13:14:51 +0300 |
commit | d3aab2ea1806813bcc2d5d5bf1fcdeee53701c41 (patch) | |
tree | 26189926c0cb90fed4e3551ce16c92aa56486db2 | |
parent | Merge branch 'master' of github.com:processone/ejabberd (diff) |
Get rid of a call to misc:have_eimp()
Diffstat (limited to '')
-rw-r--r-- | src/mod_http_upload.erl | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl index df8362d4..52036cbe 100644 --- a/src/mod_http_upload.erl +++ b/src/mod_http_upload.erl @@ -851,20 +851,15 @@ code_to_message(_Code) -> <<"">>. -spec identify(binary(), binary()) -> {ok, media_info()} | pass. identify(Path, Data) -> - case misc:have_eimp() of - true -> - case eimp:identify(Data) of - {ok, Info} -> - {ok, #media_info{ - type = proplists:get_value(type, Info), - width = proplists:get_value(width, Info), - height = proplists:get_value(height, Info)}}; - {error, Why} -> - ?DEBUG("Cannot identify type of ~s: ~s", - [Path, eimp:format_error(Why)]), - pass - end; - false -> + case eimp:identify(Data) of + {ok, Info} -> + {ok, #media_info{ + type = proplists:get_value(type, Info), + width = proplists:get_value(width, Info), + height = proplists:get_value(height, Info)}}; + {error, Why} -> + ?DEBUG("Cannot identify type of ~s: ~s", + [Path, eimp:format_error(Why)]), pass end. |