Merge branch 'feature/upload-limit' into 'develop'

config: make the upload limit configurable

See merge request pleroma/pleroma!88
This commit is contained in:
lambda 2018-04-01 08:36:48 +00:00
commit 1dcc700cca
2 changed files with 3 additions and 1 deletions

View file

@ -49,6 +49,7 @@
name: "Pleroma", name: "Pleroma",
email: "example@example.com", email: "example@example.com",
limit: 5000, limit: 5000,
upload_limit: 16_000_000,
registrations_open: true, registrations_open: true,
federating: true federating: true

View file

@ -34,7 +34,8 @@ defmodule Pleroma.Web.Endpoint do
Plug.Parsers, Plug.Parsers,
parsers: [:urlencoded, :multipart, :json], parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"], pass: ["*/*"],
json_decoder: Jason json_decoder: Jason,
length: Application.get_env(:pleroma, :instance) |> Keyword.get(:upload_limit)
) )
plug(Plug.MethodOverride) plug(Plug.MethodOverride)