aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/util
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/util')
-rw-r--r--juick-server/src/main/java/com/juick/server/util/HttpUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/util/HttpUtils.java b/juick-server/src/main/java/com/juick/server/util/HttpUtils.java
index c305093c..31a68962 100644
--- a/juick-server/src/main/java/com/juick/server/util/HttpUtils.java
+++ b/juick-server/src/main/java/com/juick/server/util/HttpUtils.java
@@ -81,7 +81,7 @@ public class HttpUtils {
throw new Exception("Wrong file type");
}
- attachmentFName = UUID.randomUUID().toString() + "." + attachmentType;
+ attachmentFName = DigestUtils.md5Hex(UUID.randomUUID().toString()) + "." + attachmentType;
fos = new FileOutputStream(Paths.get(tmpDir, attachmentFName).toString());
byte[] buffer = new byte[10240];
int len;