mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +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
|
||||
|
||||
defp analyze(%Plug.Upload{path: path}) do
|
||||
{:ok, analysis} = Analyzers.analyze(path)
|
||||
{analysis, path}
|
||||
case Analyzers.analyze(path) do
|
||||
{:ok, analysis} -> {analysis, path}
|
||||
_ -> :error
|
||||
end
|
||||
end
|
||||
|
||||
defp analyze(_upload), do: :error
|
||||
|
|
Loading…
Reference in a new issue