mod_http_upload: Fix string()/binary() type issue
authorHolger Weiss <holger@zedat.fu-berlin.de>
Mon, 26 Oct 2015 21:32:12 +0000 (22:32 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Mon, 26 Oct 2015 21:32:12 +0000 (22:32 +0100)
src/mod_http_upload.erl

index 817f93b6f5258fc5b4754ee5d174eda0063fdb09..35fd6ca34e8a2480694bdd995da771e22c547741 100644 (file)
@@ -888,7 +888,7 @@ convert(Path, #media_info{type = T, width = W, height = H}) ->
 -spec thumb_el(string(), binary()) -> xmlel().
 
 thumb_el(Path, URI) ->
-    ContentType = guess_content_type(Path),
+    ContentType = guess_content_type(list_to_binary(Path)),
     case identify(Path) of
        {ok, #media_info{height = H, width = W}} ->
            #xmlel{name = <<"thumbnail">>,