config :pleroma, Pleroma.Repo, types: Pleroma.PostgresTypes
-config :pleroma, Pleroma.Upload, uploads: "uploads"
+config :pleroma, Pleroma.Upload,
+ uploads: "uploads",
+ strip_exif: false
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
}
end
+ def strip_exif_data(file) do
+ settings = Application.get_env(:pleroma, Pleroma.Upload)
+ @do_strip = Keyword.fetch!(settings, :strip_exif)
+ if @do_strip == true do
+ Mogrify.open(file) |> Mogrify.custom("strip") |> Mogrify.save(in_place: true)
+ end
+ end
+
def upload_path do
settings = Application.get_env(:pleroma, Pleroma.Upload)
Keyword.fetch!(settings, :uploads)
{:jason, "~> 1.0"},
{:ex_machina, "~> 2.0", only: :test},
{:credo, "~> 0.7", only: [:dev, :test]},
- {:mock, "~> 0.3.0", only: :test}
+ {:mock, "~> 0.3.0", only: :test},
+ {:mogrify, "~> 0.6.1"}
]
end