mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-08-20 00:44:35 +08:00
update server/src/main/java/cn/keking/service/impl/CadFilePreviewImpl.java.
压缩文件无法预览问题修复 Signed-off-by: 马云 <12845730+jack-ma2023@user.noreply.gitee.com>
This commit is contained in:
parent
6746325bf2
commit
27ce42b397
@ -45,11 +45,17 @@ public class CadFilePreviewImpl implements FilePreview {
|
||||
String outFilePath = fileAttribute.getOutFilePath();
|
||||
// 判断之前是否已转换过,如果转换过,直接返回,否则执行转换
|
||||
if (forceUpdatedCache || !fileHandlerService.listConvertedFiles().containsKey(cacheName) || !ConfigConstants.isCacheEnabled()) {
|
||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||
if (response.isFailure()) {
|
||||
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||
String filePath = "";
|
||||
if(fileAttribute.getCompressFile()) {
|
||||
//如果是压缩文件预览无需重新下载
|
||||
filePath = fileAttribute.getOriginFilePath();
|
||||
} else {
|
||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||
if (response.isFailure()) {
|
||||
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||
}
|
||||
filePath = response.getContent();
|
||||
}
|
||||
String filePath = response.getContent();
|
||||
String imageUrls = null;
|
||||
if (StringUtils.hasText(outFilePath)) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user