mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
fix invalid mime error on reverse search
This commit is contained in:
parent
f2c1dbab0b
commit
bd2e9b4171
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue