diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 17:13:40 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2020-09-17 17:13:40 +0300 |
commit | 7cdbd91d83c02a79c22783ca489ef82e82b31a51 (patch) | |
tree | 57b14b18297b7ee2e5fd1fbbb498c639e4afe092 /config | |
parent | a781f41f969bd1a929005b2b5006a40d42855ae8 (diff) | |
download | pleroma-7cdbd91d83c02a79c22783ca489ef82e82b31a51.tar.gz |
[#2497] Configurability of :min_content_length (preview proxy). Refactoring, documentation, tests.
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 3 | ||||
-rw-r--r-- | config/description.exs | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/config/config.exs b/config/config.exs index 2ca2236a9..98c31ef86 100644 --- a/config/config.exs +++ b/config/config.exs @@ -444,7 +444,8 @@ config :pleroma, :media_preview_proxy, enabled: false, thumbnail_max_width: 600, thumbnail_max_height: 600, - image_quality: 85 + image_quality: 85, + min_content_length: 100 * 1024 config :pleroma, :chat, enabled: true diff --git a/config/description.exs b/config/description.exs index 79e3cc259..4a5d5f2ea 100644 --- a/config/description.exs +++ b/config/description.exs @@ -1961,17 +1961,25 @@ config :pleroma, :config_description, [ %{ key: :thumbnail_max_width, type: :integer, - description: "Max width of preview thumbnail." + description: + "Max width of preview thumbnail for images (video preview always has original dimensions)." }, %{ key: :thumbnail_max_height, type: :integer, - description: "Max height of preview thumbnail." + description: + "Max height of preview thumbnail for images (video preview always has original dimensions)." }, %{ key: :image_quality, type: :integer, description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)." + }, + %{ + key: :min_content_length, + type: :integer, + description: + "Min content length to perform preview, in bytes. If greater than 0, media smaller in size will be served as is, without thumbnailing." } ] }, |