aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main/java/com/juick/service
diff options
context:
space:
mode:
Diffstat (limited to 'juick-common/src/main/java/com/juick/service')
-rw-r--r--juick-common/src/main/java/com/juick/service/ImagesService.java2
-rw-r--r--juick-common/src/main/java/com/juick/service/ImagesServiceImpl.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/juick-common/src/main/java/com/juick/service/ImagesService.java b/juick-common/src/main/java/com/juick/service/ImagesService.java
index 192217fe..902301ed 100644
--- a/juick-common/src/main/java/com/juick/service/ImagesService.java
+++ b/juick-common/src/main/java/com/juick/service/ImagesService.java
@@ -5,7 +5,7 @@ import com.juick.Message;
import java.io.IOException;
public interface ImagesService {
- void setAttachmentMetadata(String imgDir, String baseUrl, Message msg) throws Exception;
+ void setAttachmentMetadata(String baseUrl, Message msg) throws Exception;
/**
* Move attached image from temp folder to image folder.
* Create preview images in corresponding folders.
diff --git a/juick-common/src/main/java/com/juick/service/ImagesServiceImpl.java b/juick-common/src/main/java/com/juick/service/ImagesServiceImpl.java
index dbc3f3a9..67c8360e 100644
--- a/juick-common/src/main/java/com/juick/service/ImagesServiceImpl.java
+++ b/juick-common/src/main/java/com/juick/service/ImagesServiceImpl.java
@@ -12,11 +12,15 @@ import java.nio.file.Paths;
public class ImagesServiceImpl implements ImagesService {
private ImageUtils imageUtils;
+ private String imgDir;
+ private String tmpDir;
public ImagesServiceImpl(String imgDir, String tmpDir) {
+ this.imgDir = imgDir;
+ this.tmpDir = tmpDir;
imageUtils = new ImageUtils(imgDir, tmpDir);
}
@Override
- public void setAttachmentMetadata(String imgDir, String baseUrl, Message msg) throws Exception {
+ public void setAttachmentMetadata(String baseUrl, Message msg) throws Exception {
if (!StringUtils.isEmpty(msg.getAttachmentType())) {
Photo photo = new Photo();
if (msg.getRid()> 0) {