From aad2c76b7bfd38383fab8dd1b10a7ecb87547e4f Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 30 Jan 2019 14:18:15 +0300 Subject: Fix downloadImage flow --- src/main/java/com/juick/server/CommandsManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/juick/server/CommandsManager.java b/src/main/java/com/juick/server/CommandsManager.java index 08dafe77..004fbf4f 100644 --- a/src/main/java/com/juick/server/CommandsManager.java +++ b/src/main/java/com/juick/server/CommandsManager.java @@ -537,6 +537,7 @@ public class CommandsManager { } else { try { attachmentFName = HttpUtils.downloadImage(attachment.toURL(), tmpDir).getHost(); + attachmentType = attachmentFName.substring(attachmentFName.length() - 3); } catch (IOException e) { logger.warn("Can not download {}", attachment.toURL()); } -- cgit v1.2.3