支持http/https文件流作为预览源url

This commit is contained in:
陈精华
2019-06-17 14:21:16 +08:00
committed by kl
parent cf1ee9c631
commit fb7cdfbef7
14 changed files with 114 additions and 44 deletions

View File

@ -19,9 +19,8 @@ public class MediaFilePreviewImpl implements FilePreview {
FileUtils fileUtils;
@Override
public String filePreviewHandle(String url, Model model) {
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
model.addAttribute("mediaUrl", url);
FileAttribute fileAttribute=fileUtils.getFileAttribute(url);
String suffix=fileAttribute.getSuffix();
if ("flv".equalsIgnoreCase(suffix)) {
return "flv";