|
|
@ -39,6 +39,7 @@ public class TiffFilePreviewImpl implements FilePreview {
|
|
|
|
String baseUrl = BaseUrlFilter.getBaseUrl();
|
|
|
|
String baseUrl = BaseUrlFilter.getBaseUrl();
|
|
|
|
String tifPreviewType = ConfigConstants.getTifPreviewType();
|
|
|
|
String tifPreviewType = ConfigConstants.getTifPreviewType();
|
|
|
|
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
|
|
|
|
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
|
|
|
|
|
|
|
|
String suffix = fileAttribute.getSuffix();
|
|
|
|
boolean forceUpdatedCache=fileAttribute.forceUpdatedCache();
|
|
|
|
boolean forceUpdatedCache=fileAttribute.forceUpdatedCache();
|
|
|
|
if (StringUtils.hasText(tifOnLinePreviewType)) {
|
|
|
|
if (StringUtils.hasText(tifOnLinePreviewType)) {
|
|
|
|
tifPreviewType = tifOnLinePreviewType;
|
|
|
|
tifPreviewType = tifOnLinePreviewType;
|
|
|
@ -47,8 +48,8 @@ public class TiffFilePreviewImpl implements FilePreview {
|
|
|
|
model.addAttribute("currentUrl", url);
|
|
|
|
model.addAttribute("currentUrl", url);
|
|
|
|
return TIFF_FILE_PREVIEW_PAGE;
|
|
|
|
return TIFF_FILE_PREVIEW_PAGE;
|
|
|
|
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";
|
|
|
|
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 strLocalTif = fileDir + fileName;
|
|
|
|
String outFilePath = fileDir + pdfName;
|
|
|
|
String outFilePath = fileDir + pdfName;
|
|
|
|
if ("pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|
if ("pdf".equalsIgnoreCase(tifPreviewType)) {
|
|
|
|