B StripLocation: Add test, work for all svgs.

This commit is contained in:
Lain Soykaf 2023-01-05 11:29:06 -05:00 committed by tusooa
commit d5125e6ce7
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
2 changed files with 14 additions and 7 deletions

View file

@ -14,7 +14,7 @@ defmodule Pleroma.Upload.Filter.Exiftool.StripLocation 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{content_type: "image/svg" <> _}), do: {:ok, :noop}
def filter(%Pleroma.Upload{tempfile: file, content_type: "image" <> _}) do
try do