update server/src/main/java/cn/keking/service/impl/TiffFilePreviewImpl.java.

同名文件不同类型处理

Signed-off-by: 高雄 <admin@cxcp.com>
This commit is contained in:
高雄 2023-04-24 05:51:31 +00:00 committed by Gitee
parent 98992b3d76
commit 37d4a1b7c4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -49,7 +49,7 @@ public class TiffFilePreviewImpl implements FilePreview {
return TIFF_FILE_PREVIEW_PAGE;
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
String pdfName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + "pdf" ; //生成文件添加类型后缀 防止同名文件
String jpgName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "jpg";
String jpgName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + "jpg" ; //生成文件添加类型后缀 防止同名文件
String strLocalTif = fileDir + fileName;
String outFilePath = fileDir + pdfName;
if ("pdf".equalsIgnoreCase(tifPreviewType)) {