[#2497] Configurability of :min_content_length (preview proxy). Refactoring, documentation, tests.

This commit is contained in:
Ivan Tashkinov 2020-09-17 17:13:40 +03:00
commit 7cdbd91d83
8 changed files with 329 additions and 63 deletions

View file

@ -58,6 +58,7 @@ defmodule Pleroma.Helpers.MediaHelper do
defp prepare_image_resize_args(_), do: {:error, :missing_options}
# Note: video thumbnail is intentionally not resized (always has original dimensions)
def video_framegrab(url) do
with executable when is_binary(executable) <- System.find_executable("ffmpeg"),
{:ok, env} <- HTTP.get(url, [], pool: :media),