aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-01-30 14:18:15 +0300
committerGravatar Vitaly Takmazov2019-01-30 14:18:15 +0300
commitaad2c76b7bfd38383fab8dd1b10a7ecb87547e4f (patch)
treee5d5b228a4835d12dcf8606066b57ecdd2a220a9 /src/main/java/com/juick
parent43f20369bcebf144dd084903630eb007ba267e0a (diff)
Fix downloadImage flow
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/server/CommandsManager.java1
1 files changed, 1 insertions, 0 deletions
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());
}