2018-01-17 17:51:53 +08:00
|
|
|
package cn.keking.service.impl;
|
|
|
|
|
|
2018-03-25 13:26:51 +08:00
|
|
|
import cn.keking.model.FileAttribute;
|
2018-01-17 17:51:53 +08:00
|
|
|
import cn.keking.service.FilePreview;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.ui.Model;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by kl on 2018/1/17.
|
|
|
|
|
* Content :其他文件
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
public class OtherFilePreviewImpl implements FilePreview {
|
|
|
|
|
@Override
|
2019-06-17 14:21:16 +08:00
|
|
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
2018-03-25 13:26:51 +08:00
|
|
|
model.addAttribute("fileType",fileAttribute.getSuffix());
|
2019-11-29 16:46:20 +08:00
|
|
|
model.addAttribute("msg", "系统还不支持该格式文件的在线预览");
|
2018-01-17 17:51:53 +08:00
|
|
|
return "fileNotSupported";
|
|
|
|
|
}
|
|
|
|
|
}
|