diff options
author | Vitaly Takmazov | 2016-11-02 17:23:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-02 17:23:29 +0300 |
commit | e6e51acf09648ffb94eeecfa74a180e25b784e67 (patch) | |
tree | e26e07c7d8cf0198648c3f931cc8d6958fd79249 | |
parent | 3d45dbab6e927ab88c6730d07c955242612eca53 (diff) |
www: target avatars are always png
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Settings.java | 6 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Settings.java b/juick-www/src/main/java/com/juick/www/Settings.java index 0602bff1..5a159362 100644 --- a/juick-www/src/main/java/com/juick/www/Settings.java +++ b/juick-www/src/main/java/com/juick/www/Settings.java @@ -157,8 +157,10 @@ public class Settings { info.setDescription(request.getParameter("descr")); String avatarTmpPath = Utils.receiveMultiPartFile(request, "avatar"); if (StringUtils.isNotEmpty(avatarTmpPath)) { - String targetName = String.format("%s.%s", visitor.getUID(), FilenameUtils.getExtension(avatarTmpPath)); - Path ao = Paths.get(imgPath, "ao", targetName); + String originalExtension = FilenameUtils.getExtension(avatarTmpPath); + String originalName = String.format("%s.%s", visitor.getUID(), originalExtension); + String targetName = String.format("%s.png", visitor.getUID()); + Path ao = Paths.get(imgPath, "ao", originalName); Path a = Paths.get(imgPath, "a", targetName); Path as = Paths.get(imgPath, "as", targetName); Files.move(Paths.get(Utils.getTmpDir(), avatarTmpPath), ao); @@ -1,4 +1,4 @@ -git clone git@x.juick.com:/srv/git/juick.git +1git clone git@x.juick.com:/srv/git/juick.git cd juick |