[#2497] Configurability of :min_content_length (preview proxy). Refactoring, documentation, tests.
This commit is contained in:
parent
a781f41f96
commit
7cdbd91d83
8 changed files with 329 additions and 63 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue