예제 #1
0
 public void deleteOldPortraitPath(String oldPortraitPath) {
   if (oldPortraitPath != null && !oldPortraitPath.trim().equals("")) {
     FileUtil.delete("/" + oldPortraitPath);
   }
 }
예제 #2
0
 static void savePortrait(String basePath, File file, int width) {
   String imgPath = ServletActionContext.getServletContext().getRealPath("/") + basePath;
   FileUtil.copyFileToPath(file, imgPath);
   ImageCutAndZoom.zoom(imgPath, width);
 }