mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 05:37:59 +01:00
bump app upload limit to 125MB
This commit is contained in:
parent
87eee9b332
commit
cc571a38c2
4 changed files with 4 additions and 4 deletions
|
@ -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]+)$ {
|
||||
|
|
|
@ -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 ->
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue