bump app upload limit to 125MB

This commit is contained in:
Luna D 2020-10-21 20:10:11 +02:00
parent 87eee9b332
commit cc571a38c2
No known key found for this signature in database
GPG key ID: 81AF416F2CC36FC8
4 changed files with 4 additions and 4 deletions

View file

@ -8,7 +8,7 @@ server {
root $APP_DIR/priv/static;
client_max_body_size 100M;
client_max_body_size 125000000;
client_body_buffer_size 128k;
location ~ ^/img/view/(.+)/([0-9]+).*\.([A-Za-z0-9]+)$ {

View file

@ -12,7 +12,7 @@ defmodule Philomena.Http do
end
defp adapter_opts(opts) do
opts = Keyword.merge(opts, max_body: 100_000_000)
opts = Keyword.merge(opts, max_body: 125_000_000)
case Application.get_env(:philomena, :proxy_host) do
nil ->

View file

@ -154,7 +154,7 @@ defmodule Philomena.Images.Image do
:uploaded_image,
:image_is_animated
])
|> validate_number(:image_size, greater_than: 0, less_than_or_equal_to: 100_000_000)
|> validate_number(:image_size, greater_than: 0, less_than_or_equal_to: 125_000_000)
|> validate_number(:image_width, greater_than: 0, less_than_or_equal_to: 32767)
|> validate_number(:image_height, greater_than: 0, less_than_or_equal_to: 32767)
|> validate_length(:image_name, max: 255, count: :bytes)

View file

@ -28,7 +28,7 @@ defmodule PhilomenaWeb.Endpoint do
plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
plug Plug.Parsers,
parsers: [:urlencoded, {:multipart, length: 100_000_000}, :json],
parsers: [:urlencoded, {:multipart, length: 125_000_000}, :json],
pass: ["*/*"],
json_decoder: Phoenix.json_library()