Skip to content

Commit 97f9659

Browse files
authored
Fix example for Plug.Parsers.MULTIPART dynamic configuration (#1108)
The correct key for the body length limit is :length, and the keyword list was also doubly wrapped Signed-off-by: Riccardo Binetti <rbino@gmx.com>
1 parent ccafcd2 commit 97f9659

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/plug/parsers/multipart.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ defmodule Plug.Parsers.MULTIPART do
7676
end
7777
7878
def parse(conn, "multipart", subtype, headers, opts) do
79-
limit = [limit: System.fetch_env!("UPLOAD_LIMIT")]
80-
opts = @multipart.init([limit: limit] ++ opts)
79+
length = System.fetch_env!("UPLOAD_LIMIT")
80+
opts = @multipart.init([length: length] ++ opts)
8181
@multipart.parse(conn, "multipart", subtype, headers, opts)
8282
end
8383

0 commit comments

Comments
 (0)