giant massive dep upgrade and dialyxir-found error emporium (#371)
[akkoma] / lib / pleroma / web / plugs / parsers / multipart.ex
1 defmodule Pleroma.Web.Plugs.Parsers.Multipart do
2 @multipart Plug.Parsers.MULTIPART
3
4 alias Pleroma.Config
5
6 def init(opts) do
7 opts
8 end
9
10 def parse(conn, "multipart", subtype, headers, opts) do
11 length = Config.get([:instance, :upload_limit])
12
13 opts = @multipart.init([length: length] ++ opts)
14
15 @multipart.parse(conn, "multipart", subtype, headers, opts)
16 end
17
18 def parse(conn, _type, _subtype, _headers, _opts) do
19 {:next, conn}
20 end
21 end