From 16b33e09780b4778f37257a4f81803b3777754ec Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Nov 2016 16:14:14 +0300 Subject: xmpp-ft: lowercase extension --- juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-xmpp-ft/src') diff --git a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java index e922e7fa..14d65de9 100644 --- a/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java +++ b/juick-xmpp-ft/src/main/java/com/juick/components/XMPPFTServer.java @@ -56,7 +56,7 @@ public class XMPPFTServer { fileTransferManager.addFileTransferOfferListener(e -> { try { List allowedTypes = new ArrayList() {{ add("png"); add("jpg"); }}; - String attachmentExtension = FilenameUtils.getExtension(e.getName()); + String attachmentExtension = FilenameUtils.getExtension(e.getName()).toLowerCase(); String targetFilename = String.format("%s.%s", DigestUtils.md5Hex(String.format("%s-%s", e.getInitiator().toString(), e.getSessionId()).getBytes()), attachmentExtension); -- cgit v1.2.3