mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-26 02:39:11 +08:00
精简util模块,ReturenResponse重构
This commit is contained in:
@@ -34,7 +34,7 @@ public class CompressFilePreviewImpl implements FilePreview {
|
||||
// 判断文件名是否存在(redis缓存读取)
|
||||
if (!StringUtils.hasText(fileHandlerService.getConvertedFile(fileName)) || !ConfigConstants.isCacheEnabled()) {
|
||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||
if (0 != response.getCode()) {
|
||||
if (response.isFailure()) {
|
||||
model.addAttribute("fileType", suffix);
|
||||
model.addAttribute("msg", response.getMsg());
|
||||
return "fileNotSupported";
|
||||
|
||||
Reference in New Issue
Block a user