Skip to content

Commit

Permalink
Fix deprecated File.stream!(file, options, line_or_bytes)
Browse files Browse the repository at this point in the history
  • Loading branch information
Awea committed Feb 6, 2024
1 parent d5588bc commit e6d3c6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.14.0-otp-25
erlang 25.0.4
elixir 1.16.1-otp-26
erlang 26.2.1
2 changes: 1 addition & 1 deletion lib/multipart/part.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Multipart.Part do
@spec file_body(String.t(), headers()) :: t()
def file_body(path, headers \\ []) do
%File.Stat{size: size} = File.stat!(path)
file_stream = File.stream!(path, [{:read_ahead, 4096}], 1024)
file_stream = File.stream!(path, 1024, [{:read_ahead, 4096}])

%__MODULE__{body: file_stream, content_length: size, headers: headers}
end
Expand Down

0 comments on commit e6d3c6c

Please sign in to comment.