From f3312679fa538122cd81e0e9a0a251ebb296b80e Mon Sep 17 00:00:00 2001 From: KillyMXI Date: Tue, 20 Jun 2017 01:41:58 +0300 Subject: HttpUtils.downloadImage() takes additional argument, one hardcoded path less --- juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 4 ++-- juick-www/src/main/java/com/juick/www/controllers/XMPPPost.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-www/src/main/java') diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java index 7875f52b..1931b1d9 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java +++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java @@ -203,7 +203,7 @@ public class NewMessage { if (StringUtils.isBlank(attachmentFName) && img != null && img.length() > 10) { try { URL imgUrl = new URL(img); - attachmentFName = HttpUtils.downloadImage(imgUrl); + attachmentFName = HttpUtils.downloadImage(imgUrl, webApp.getTmpDir()); } catch (Exception e) { logger.error("DOWNLOAD ERROR", e); throw new HttpBadRequestException(); @@ -356,7 +356,7 @@ public class NewMessage { if (StringUtils.isBlank(attachmentFName) && img != null && img.length() > 10) { try { URL imgUrl = new URL(img); - attachmentFName = HttpUtils.downloadImage(imgUrl); + attachmentFName = HttpUtils.downloadImage(imgUrl, webApp.getTmpDir()); } catch (Exception e) { logger.error("DOWNLOAD ERROR", e); throw new HttpBadRequestException(); diff --git a/juick-www/src/main/java/com/juick/www/controllers/XMPPPost.java b/juick-www/src/main/java/com/juick/www/controllers/XMPPPost.java index 330f277c..45fff7ce 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/XMPPPost.java +++ b/juick-www/src/main/java/com/juick/www/controllers/XMPPPost.java @@ -52,7 +52,7 @@ public class XMPPPost { if (StringUtils.isBlank(attachmentFName) && img != null && img.length() > 10) { try { URL imgUrl = new URL(img); - attachmentFName = HttpUtils.downloadImage(imgUrl); + attachmentFName = HttpUtils.downloadImage(imgUrl, webApp.getTmpDir()); } catch (Exception e) { logger.error("DOWNLOAD ERROR", e); throw new HttpBadRequestException(); -- cgit v1.2.3