fix "exiftool not support svg files'
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed

This commit is contained in:
ihor 2023-01-05 14:09:01 +00:00
parent d9508474b6
commit adb0a01d0a

View file

@ -14,7 +14,8 @@ defmodule Pleroma.Upload.Filter.Exiftool do
# Formats not compatible with exiftool at this time
def filter(%Pleroma.Upload{content_type: "image/heic"}), do: {:ok, :noop}
def filter(%Pleroma.Upload{content_type: "image/webp"}), do: {:ok, :noop}
def filter(%Pleroma.Upload{content_type: "image/svg+xml"}), do: {:ok, :noop}
def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do
try do
case System.cmd("exiftool", ["-overwrite_original", "-gps:all=", file], parallelism: true) do