mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2025-10-25 02:09:09 +08:00
精简util模块,ReturenResponse重构
This commit is contained in:
@@ -27,7 +27,7 @@ public class SimTextFilePreviewImpl implements FilePreview {
|
||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||
String fileName = fileAttribute.getName();
|
||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||
if (0 != response.getCode()) {
|
||||
if (response.isFailure()) {
|
||||
model.addAttribute("msg", response.getMsg());
|
||||
model.addAttribute("fileType", fileAttribute.getSuffix());
|
||||
return "fileNotSupported";
|
||||
|
||||
Reference in New Issue
Block a user