fix invalid mime error on reverse search

This commit is contained in:
byte[] 2020-09-08 00:02:24 -04:00
parent f2c1dbab0b
commit bd2e9b4171

View file

@ -26,8 +26,10 @@ defmodule PhilomenaWeb.ImageReverse do
end end
defp analyze(%Plug.Upload{path: path}) do defp analyze(%Plug.Upload{path: path}) do
{:ok, analysis} = Analyzers.analyze(path) case Analyzers.analyze(path) do
{analysis, path} {:ok, analysis} -> {analysis, path}
_ -> :error
end
end end
defp analyze(_upload), do: :error defp analyze(_upload), do: :error