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