From e23cbc2ed5e26d98fa1b6daa0d1eec092a46b4a3 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Tue, 29 Oct 2024 05:17:20 -0700 Subject: [PATCH] Don't upload thumbnails for svg files --- src/main/java/zander/ui/LibraryUploadDialog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/zander/ui/LibraryUploadDialog.java b/src/main/java/zander/ui/LibraryUploadDialog.java index cf9fe17..80f2589 100644 --- a/src/main/java/zander/ui/LibraryUploadDialog.java +++ b/src/main/java/zander/ui/LibraryUploadDialog.java @@ -308,7 +308,8 @@ public class LibraryUploadDialog extends JDialog { } else { byte[] bytes = md.loadRawBytes(); rl.addBinaryFile(getPathForAlbum(as.getNameOnDisk()) + ms.getName(), bytes); - if (md instanceof ImageMediaData) { + // SVG files don't need a thumbnail + if (md instanceof ImageMediaData && !md.getType().startsWith("image/svg")) { uploadImageThumbnail(state, as, mc, ms, bytes); } else if (md instanceof VideoMediaData) { uploadVideoThumbnail(state, as, mc, ms, (VideoMediaData) md);