Merge pull request #317 from metaphore/svg-attachment-fix

Fix SVG Attachments
This commit is contained in:
Niels Andriesse 2020-09-03 14:36:47 +10:00 committed by GitHub
commit 531a81aa56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -226,7 +226,9 @@ public class MediaUtil {
}
public static boolean isImageType(String contentType) {
return (null != contentType) && contentType.startsWith("image/");
return (null != contentType)
&& contentType.startsWith("image/")
&& !contentType.contains("svg"); // Do not treat SVGs as regular images.
}
public static boolean isAudioType(String contentType) {