X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fupload%2Ffilter%2Fexiftool.ex;h=c7fb6aefa95e87d69b5ce3fd24681ce2984a9ce3;hb=3f65f2ea79644cd8a119fc154c2792994723c7cb;hp=833d8cab4fb707934a566b484da10760fa357e7d;hpb=61675938811a8f2121c857f285d31bd4c7ef3336;p=akkoma diff --git a/lib/pleroma/upload/filter/exiftool.ex b/lib/pleroma/upload/filter/exiftool.ex index 833d8cab4..c7fb6aefa 100644 --- a/lib/pleroma/upload/filter/exiftool.ex +++ b/lib/pleroma/upload/filter/exiftool.ex @@ -3,11 +3,12 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Upload.Filter.Exiftool do + @moduledoc """ + Strips GPS related EXIF tags and overwrites the file in place. + Also strips or replaces filesystem metadata e.g., timestamps. + """ @behaviour Pleroma.Upload.Filter - @type conversion :: action :: String.t() | {action :: String.t(), opts :: String.t()} - @type conversions :: conversion() | [conversion()] - def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true) :ok