更新时间:2022-08-19 17:34:07
//如果是图片文件,则执行缩放处理 Path source = Paths.get(newFilePath); String contentType = Files.probeContentType(source); if (contentType.startsWith("image")){ String thumbPath = this.getImgAbsolutePath(request, "thumb"); ImageUtils.resize(newFilePath, thumbPath, 94, 222, true); }