Пример #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);
 }