Redirects for videos right now
This commit is contained in:
parent
899ea2da3e
commit
ddbddc08fc
1 changed files with 6 additions and 0 deletions
|
@ -69,6 +69,12 @@ defp handle_preview("image/" <> _ = _content_type, conn, url) do
|
||||||
handle_image_preview(conn, url)
|
handle_image_preview(conn, url)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
defp handle_preview("video/" <> _ = _content_type, conn, url) do
|
||||||
|
mediaproxy_url = url |> MediaProxy.url()
|
||||||
|
|
||||||
|
redirect(conn, external: mediaproxy_url)
|
||||||
|
end
|
||||||
|
|
||||||
defp handle_preview(content_type, conn, _url) do
|
defp handle_preview(content_type, conn, _url) do
|
||||||
send_resp(conn, :unprocessable_entity, "Unsupported content type: #{content_type}.")
|
send_resp(conn, :unprocessable_entity, "Unsupported content type: #{content_type}.")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue