forked from AkkomaGang/akkoma
maybe I should learn proper elixir ;D
This commit is contained in:
parent
2df0fd1462
commit
ca63585a32
1 changed files with 2 additions and 2 deletions
|
@ -86,10 +86,10 @@ def store(%{"img" => "data:image/" <> image_data}, should_dedupe) do
|
||||||
|
|
||||||
def strip_exif_data(content_type, file) do
|
def strip_exif_data(content_type, file) do
|
||||||
settings = Application.get_env(:pleroma, Pleroma.Upload)
|
settings = Application.get_env(:pleroma, Pleroma.Upload)
|
||||||
@do_strip = Keyword.fetch!(settings, :strip_exif)
|
do_strip = Keyword.fetch!(settings, :strip_exif)
|
||||||
[filetype, ext] = String.split(content_type, "/")
|
[filetype, ext] = String.split(content_type, "/")
|
||||||
|
|
||||||
if filetype == "image" and @do_strip == true do
|
if filetype == "image" and do_strip == true do
|
||||||
Mogrify.open(file) |> Mogrify.custom("strip") |> Mogrify.save(in_place: true)
|
Mogrify.open(file) |> Mogrify.custom("strip") |> Mogrify.save(in_place: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue