|
|
|
@ -39,6 +39,7 @@ public class TiffFilePreviewImpl implements FilePreview {
|
|
|
|
|
String baseUrl = BaseUrlFilter.getBaseUrl();
|
|
|
|
|
String tifPreviewType = ConfigConstants.getTifPreviewType();
|
|
|
|
|
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
|
|
|
|
|
String suffix = fileAttribute.getSuffix();
|
|
|
|
|
boolean forceUpdatedCache=fileAttribute.forceUpdatedCache();
|
|
|
|
|
if (StringUtils.hasText(tifOnLinePreviewType)) {
|
|
|
|
|
tifPreviewType = tifOnLinePreviewType;
|
|
|
|
@ -47,8 +48,8 @@ public class TiffFilePreviewImpl implements FilePreview {
|
|
|
|
|
model.addAttribute("currentUrl", url);
|
|
|
|
|
return TIFF_FILE_PREVIEW_PAGE;
|
|
|
|
|
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";
|
|
|
|
|
String jpgName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "jpg";
|
|
|
|
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + "pdf" ; //生成文件添加类型后缀 防止同名文件
|
|
|
|
|
String jpgName = fileName.substring(0, fileName.lastIndexOf(".")) + suffix +"." + "jpg" ; //生成文件添加类型后缀 防止同名文件
|
|
|
|
|
String strLocalTif = fileDir + fileName;
|
|
|
|
|
String outFilePath = fileDir + pdfName;
|
|
|
|
|
if ("pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|
|