mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-12 02:57:22 +00:00
修复压缩获取路径错误,图片合集路径错误,水印问题等BUG
This commit is contained in:
@@ -54,15 +54,11 @@ public class CompressFilePreviewImpl implements FilePreview {
|
||||
try {
|
||||
fileTree = compressFileReader.unRar(filePath, filePassword, fileName, fileAttribute);
|
||||
} catch (Exception e) {
|
||||
logger.error("Error processing RAR file: " + e.getMessage(), e);
|
||||
Throwable[] throwableArray = ExceptionUtils.getThrowables(e);
|
||||
for (Throwable throwable : throwableArray) {
|
||||
if (throwable instanceof IOException || throwable instanceof EncryptedDocumentException) {
|
||||
if (e.getMessage().toLowerCase().contains(Rar_PASSWORD_MSG)) {
|
||||
model.addAttribute("needFilePassword", true);
|
||||
return EXEL_FILE_PREVIEW_PAGE;
|
||||
}
|
||||
}
|
||||
if (e.getMessage().toLowerCase().contains(Rar_PASSWORD_MSG)) {
|
||||
model.addAttribute("needFilePassword", true);
|
||||
return EXEL_FILE_PREVIEW_PAGE;
|
||||
}else {
|
||||
logger.error("Error processing RAR file: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (!ObjectUtils.isEmpty(fileTree)) {
|
||||
|
||||
Reference in New Issue
Block a user