Skip to content

Commit 083e49b

Browse files
committed
Replace mimerl with MIME
1 parent be52124 commit 083e49b

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

lib/tesla/multipart.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ defmodule Tesla.Multipart do
8989

9090
# add in detected content-type if necessary
9191
headers = case detect_content_type do
92-
true -> Keyword.put(headers, :"Content-Type", :mimerl.filename(filename))
92+
true -> Keyword.put(headers, :"Content-Type", MIME.from_path(filename))
9393
false -> headers
9494
end
9595

mix.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ defmodule Tesla.Mixfile do
4848

4949
defp deps do
5050
[
51+
{:mime, "~> 1.0"},
52+
5153
# http clients
5254
{:ibrowse, "~> 4.2", optional: true},
5355
{:hackney, "~> 1.6", optional: true},

mix.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"idna": {:hex, :idna, "5.1.0", "d72b4effeb324ad5da3cab1767cb16b17939004e789d8c0ad5b70f3cea20c89a", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, optional: false]}]},
1717
"jsx": {:hex, :jsx, "2.8.2", "7acc7d785b5abe8a6e9adbde926a24e481f29956dd8b4df49e3e4e7bcc92a018", [:mix, :rebar3], []},
1818
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
19+
"mime": {:hex, :mime, "1.1.0", "01c1d6f4083d8aa5c7b8c246ade95139620ef8effb009edde934e0ec3b28090a", [], [], "hexpm"},
1920
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
2021
"mix_test_watch": {:hex, :mix_test_watch, "0.4.1", "a98a84c795623f1ba020324f4354cf30e7120ba4dab65f9c2ae300f830a25f75", [:mix], [{:fs, "~> 0.9.1", [hex: :fs, optional: false]}]},
2122
"poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []},

0 commit comments

Comments
 (0)