aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/controllers/NewMessage.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/NewMessage.java4
1 files changed, 3 insertions, 1 deletions
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 07605830..042a1b0f 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
@@ -67,6 +67,8 @@ public class NewMessage {
private WebApp webApp;
@Inject
private ExternalComponent xmpp;
+ @Inject
+ private ImagesService imagesService;
@Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String imgDir;
@Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
@@ -167,7 +169,7 @@ public class NewMessage {
String fname = mid + "-" + ridnew + "." + attachmentType;
String attachmentURL = "http://i.juick.com/photos-1024/" + fname;
- ImageUtils.saveImageWithPreviews(attachmentFName.getHost(), fname, tmpDir, imgDir);
+ imagesService.saveImageWithPreviews(attachmentFName.getHost(), fname);
body = attachmentURL + "\n" + body;
try {