Compare commits

...

9 Commits
v1.0 ... v1.1

Author SHA1 Message Date
6f2001b8c9 1.修复不支持文件类型提示时抛异常的问题
2.添加多媒体文件预览支持,如mp4,mp3等文件
2018-03-25 13:26:51 +08:00
kl
378920b773 解决多图片轮播预览数据量大的问题 2018-03-08 14:28:44 +08:00
kl
c78bf0605d 完善多图片轮播预览接口逻辑 2018-03-08 09:51:47 +08:00
kl
e8f0efe1ec Update README.md 2018-01-22 09:18:24 +08:00
kl
f8ebc4e39b Merge remote-tracking branch 'origin/master' 2018-01-19 15:14:38 +08:00
kl
3ecea6ee6c 修复包名异常问题 2018-01-19 15:14:01 +08:00
kl
540e434954 Update README.md 2018-01-19 14:57:08 +08:00
kl
6754232a1d 1.大文件入队提前处理
2.新增addTask文件转换入队接口
3.支持kkFIleView接口和异构系统redis入队
2018-01-19 14:51:18 +08:00
ad790f4ae9 Update README.en.md 2018-01-18 09:06:52 +08:00
23 changed files with 280 additions and 68 deletions

View File

@ -1,26 +1,33 @@
# file-online-preview
This kekingcn kkFileView software is intended to be a solution for previewing documents online. There are some similar paid products in the industry, at present.
Such as 【[永中office](http://dcs.yozosoft.com/)】,【[office365](http://www.officeweb365.com/)】,【[idocv](https://www.idocv.com/)】, etc..
The kekingcn kkFileView software is an open source implementation and released under the Apache License version 2. It's aimed to feedback the community after obtaining the consent of company executives,
[![GitHub license](https://img.shields.io/github/license/kekingcn/kkFileView.svg?style=flat-square)](https://github.com/kekingcn/kkFileView/blob/master/LICENSE)
### Introduction
This kekingcn kkFileView project is intended to be a solution for previewing documents online. At present,there are some similar paid products in the industry.
Such as 【[永中office](http://dcs.yozosoft.com/)】,【[office365](http://www.officeweb365.com/)】,【[idocv](https://www.idocv.com/)】, etc...
It is an open source implementation and released under the Apache License version 2.0. Finally,It is aimed to feedback the community after obtaining the consent of company executives,
special thanks to the supports of @唐老大 and the contributions of @端木详笑.
### Advantages
* build with the popular frame spring boot,
* easy to deploy and deploy,
* basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc.
### Features
- Build with the popular frame spring boot
- Easy to build and deploy
- Basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc
- REST API
- Abstract file preview interface so that it is easy to extend more file extensions and develop this project on your own
### The demo online
### Live demo
> Please treat public service kindly, or this would stop at any time.
URLhttp://file.keking.cn/
### Project documentation
### Documentation
1. 中文文档https://gitee.com/kekingcn/file-online-preview/blob/master/README.md
1. English documenthttps://github.com/kekingcn/kkFileView/blob/master/README.en.md
### Contact us && Join us
> We will answer everyone's questions which are found when using this project patiently.
And please Google or Baidu first before asking a question, so that we can solve then efficiently.
> We will answer everyone's questions in use of this project.
And please Google or Baidu first before asking a question, so that we can solve it efficiently.
Cherish life away from ineffective communication.
![输入图片说明](https://gitee.com/uploads/images/2017/1219/173717_934cb068_492218.png "屏幕截图.png")
@ -41,19 +48,19 @@ QQ group613025121
> png,jpeg,jpg,etc., support for zooming with mouse scroll, rotation, inversion,etc.
![输入图片说明](https://gitee.com/uploads/images/2017/1213/094335_657a6f60_492218.png "屏幕截图.png")
Considering space issues, the pictures of other types of documents will not be shown here.You can deploy it by yourself if you are interested in our project.The way to deploy is as below.
Considering space issues, the pictures of other types of documents will not be shown here.You can deploy it by yourself if you are interested in our project.There is a way to deploy it as below.
### Quick Start
> Technologies in this project
- spring boot [spring boot Development Reference Guide](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
- freemarker
- redisson
- jodconverter
> Dependent External Environment
- redis
> Technology stack
- Spring boot [spring boot Development Reference Guide](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
- Freemarker
- Redisson
- Jodconverter
> Dependencies
- Redis
- OpenOffice or LibreOffice
1. First steppull https://github.com/kekingcn/file-online-preview.git
1. First step`git pull https://github.com/kekingcn/file-online-preview.git`
2. Second stepconfigure redis address and OpenOffice directorysuch as
```
@ -67,23 +74,30 @@ office.home = C:\\Program Files (x86)\\OpenOffice 4
```
'file.dir' is the real storage address of the converted files, please end with '/'.
3. Third stepRun the main method of FilePreviewApplication.java.After starting,visit 'http://localhost:8012/'.
3. Third stepRun the main method of FilePreviewApplication.java.After starting,visit `http://localhost:8012/`.
If everything is ok,you will see the picture below.
![输入图片说明](https://gitee.com/uploads/images/2017/1213/100221_ea15202e_492218.png "屏幕截图.png")
### System Update History
### Changelog
> January 12th 2018
> January 17th 2018
1. Refined the project directory, abstract file preview interface, Easy to extend more file extensions and depoly this project on your own
1. Added English documentation (@幻幻Fate@汝辉) contribution
1. Support for more image file extensions
1. Fixed the issue that image carousel in zip file will always start from the first
> January 12th 2018
1. Support for multiple images preview
1. Support for images rotation preview in rar/zip
> January 2nd 2018
> January 2nd 2018
1. fixed gibberish issue when preview a txt document caused by the file encoding problem
1. fixed the issue that some module dependencies can not be found
1. add a spring boot profile, and support for Multi-environment configuration
1. add 'pdf.js' to preview the documents such as doc,etc.,support for generating doc headlines as pdf menusupport for mobile preview
1. Fixed gibberish issue when preview a txt document caused by the file encoding problem
1. Fixed the issue that some module dependencies can not be found
1. Add a spring boot profile, and support for Multi-environment configuration
1. Add `pdf.js` to preview the documents such as doc,etc.,support for generating doc headlines as pdf menusupport for mobile preview
### Register Usage
If this project is helpful for you, please register on 'https://gitee.com/kekingcn/file-online-preview/issues/IGSBV',

View File

@ -7,7 +7,7 @@
1. 支持zip,rar,jar,tar,gzip等压缩包
1. 支持jpgjpegpnggif等图片预览翻转缩放镜像
1. 使用spring boot开发预览服务搭建部署非常简便
1. rest接口提供服务应用接入简单方便
1. rest接口提供服务跨平台特性(java,php,python,go,php....)都支持,应用接入简单方便
1. 抽象预览服务接口,方便二次开发,非常方便添加其他类型文件预览支持
1. 最最重要Apache协议开源代码pull下来想干嘛就干嘛
@ -73,6 +73,12 @@ file.dir为转换文件实际存储地址注意要以/结尾
### 历史更新记录
> 2018年01月19日
1. 大文件入队提前处理
1. 新增addTask文件转换入队接口
1. 采用redis队列支持kkFIleView接口和异构系统入队两种方式
> 2018年01月17日
1. 优化项目结构,抽象文件预览接口,更方便的加入更多的文件类型预览支持,方便二次开发

View File

@ -10,7 +10,8 @@ public enum FileType {
office("officeFilePreviewImpl"),
simText("simTextFilePreviewImpl"),
pdf("pdfFilePreviewImpl"),
other("otherFilePreviewImpl");
other("otherFilePreviewImpl"),
media("mediaFilePreviewImpl");
private String instanceName;
FileType(String instanceName){

View File

@ -1,4 +1,4 @@
package cn.keking.param;
package cn.keking.model;
import java.io.Serializable;

View File

@ -0,0 +1,84 @@
package cn.keking.service;
import cn.keking.model.FileAttribute;
import cn.keking.model.FileType;
import cn.keking.utils.FileUtils;
import org.redisson.api.RBlockingQueue;
import org.redisson.api.RedissonClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.ExtendedModelMap;
import javax.annotation.PostConstruct;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Created by kl on 2018/1/19.
* Content :消费队列中的转换文件
*/
@Service
public class FileConverQueueTask {
Logger logger= LoggerFactory.getLogger(getClass());
public static final String queueTaskName="FileConverQueueTask";
@Autowired
FilePreviewFactory previewFactory;
@Autowired
RedissonClient redissonClient;
@Autowired
FileUtils fileUtils;
@PostConstruct
public void startTask(){
ExecutorService executorService = Executors.newFixedThreadPool(3);
executorService.submit(new ConverTask(previewFactory,redissonClient,fileUtils));
logger.info("队列处理文件转换任务启动完成 ");
}
class ConverTask implements Runnable{
FilePreviewFactory previewFactory;
RedissonClient redissonClient;
FileUtils fileUtils;
public ConverTask(FilePreviewFactory previewFactory, RedissonClient redissonClient,FileUtils fileUtils) {
this.previewFactory = previewFactory;
this.redissonClient = redissonClient;
this.fileUtils=fileUtils;
}
@Override
public void run() {
while (true) {
try {
final RBlockingQueue<String> queue = redissonClient.getBlockingQueue(FileConverQueueTask.queueTaskName);
String url = queue.take();
if(url!=null){
FileAttribute fileAttribute=fileUtils.getFileAttribute(url);
logger.info("正在处理转换任务,文件名称【{}】",fileAttribute.getName());
FileType fileType=fileAttribute.getType();
if(fileType.equals(FileType.compress) || fileType.equals(FileType.office)){
FilePreview filePreview=previewFactory.get(url);
filePreview.filePreviewHandle(url,new ExtendedModelMap());
}
}
} catch (Exception e) {
try {
Thread.sleep(1000*10);
}catch (Exception ex){
ex.printStackTrace();
}
e.printStackTrace();
}
}
}
}
}

View File

@ -1,7 +1,7 @@
package cn.keking.service.impl;
import cn.keking.model.FileAttribute;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import cn.keking.service.FilePreview;
import cn.keking.utils.DownloadUtils;
import cn.keking.utils.FileUtils;

View File

@ -0,0 +1,27 @@
package cn.keking.service.impl;
import cn.keking.service.FilePreview;
import cn.keking.utils.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
/**
* @author : kl
* @authorboke : kailing.pub
* @create : 2018-03-25 上午11:58
* @description:
**/
@Service
public class MediaFilePreviewImpl implements FilePreview {
@Autowired
FileUtils fileUtils;
@Override
public String filePreviewHandle(String url, Model model) {
model.addAttribute("mediaUrl", url);
return "media";
}
}

View File

@ -1,7 +1,7 @@
package cn.keking.service.impl;
import cn.keking.model.FileAttribute;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import cn.keking.service.FilePreview;
import cn.keking.utils.DownloadUtils;
import cn.keking.utils.FileUtils;
@ -9,6 +9,7 @@ import cn.keking.utils.OfficeToPdf;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.ui.ExtendedModelMap;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;

View File

@ -1,6 +1,9 @@
package cn.keking.service.impl;
import cn.keking.model.FileAttribute;
import cn.keking.service.FilePreview;
import cn.keking.utils.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
@ -10,8 +13,14 @@ import org.springframework.ui.Model;
*/
@Service
public class OtherFilePreviewImpl implements FilePreview {
@Autowired
FileUtils fileUtils;
@Override
public String filePreviewHandle(String url, Model model) {
FileAttribute fileAttribute=fileUtils.getFileAttribute(url);
model.addAttribute("fileType",fileAttribute.getSuffix());
model.addAttribute("msg", "系统还不支持该格式文件的在线预览," +
"如有需要请按下方显示的邮箱地址联系系统维护人员");
return "fileNotSupported";

View File

@ -1,8 +1,7 @@
package cn.keking.service.impl;
import cn.keking.model.FileAttribute;
import cn.keking.model.FileType;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import cn.keking.service.FilePreview;
import cn.keking.utils.FileUtils;
import cn.keking.utils.SimTextUtil;
@ -10,8 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import java.net.URLDecoder;
/**
* Created by kl on 2018/1/17.
* Content :处理文本文件
@ -33,6 +30,7 @@ public class SimTextFilePreviewImpl implements FilePreview{
ReturnResponse<String> response = simTextUtil.readSimText(decodedUrl, fileName);
if (0 != response.getCode()) {
model.addAttribute("msg", response.getMsg());
model.addAttribute("fileType",fileAttribute.getSuffix());
return "fileNotSupported";
}
model.addAttribute("ordinaryUrl", response.getMsg());

View File

@ -1,11 +1,10 @@
package cn.keking.utils;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.io.*;
import java.net.*;
import java.nio.charset.Charset;
import java.util.UUID;
/**

View File

@ -40,6 +40,9 @@ public class FileUtils {
@Value("${simText}")
String[] simText;
@Value("${media}")
String[] media;
/**
* 已转换过的文件集合(redis缓存)
* @return
@ -80,6 +83,9 @@ public class FileUtils {
if (Arrays.asList(simText).contains(fileType.toLowerCase())) {
return FileType.simText;
}
if (Arrays.asList(media).contains(fileType.toLowerCase())) {
return FileType.media;
}
if("pdf".equalsIgnoreCase(fileType)){
return FileType.pdf;
}

View File

@ -1,6 +1,6 @@
package cn.keking.utils;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

View File

@ -4,7 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;
import cn.keking.param.ReturnResponse;
import cn.keking.model.ReturnResponse;
import cn.keking.utils.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

View File

@ -1,14 +1,20 @@
package cn.keking.web.controller;
import cn.keking.service.FileConverQueueTask;
import cn.keking.service.FilePreview;
import cn.keking.service.FilePreviewFactory;
import org.apache.commons.io.IOUtils;
import org.redisson.api.RBlockingQueue;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@ -31,6 +37,9 @@ public class OnlinePreviewController {
@Autowired
FilePreviewFactory previewFactory;
@Autowired
RedissonClient redissonClient;
/**
* @param url
* @param model
@ -38,9 +47,9 @@ public class OnlinePreviewController {
*/
@RequestMapping(value = "onlinePreview", method = RequestMethod.GET)
public String onlinePreview(String url, Model model, HttpServletRequest req) {
req.setAttribute("fileKey",req.getParameter("fileKey"));
FilePreview filePreview=previewFactory.get(url);
return filePreview.filePreviewHandle(url,model);
req.setAttribute("fileKey", req.getParameter("fileKey"));
FilePreview filePreview = previewFactory.get(url);
return filePreview.filePreviewHandle(url, model);
}
/**
@ -52,17 +61,32 @@ public class OnlinePreviewController {
* @throws UnsupportedEncodingException
*/
@RequestMapping(value = "picturesPreview", method = RequestMethod.GET)
public String picturesPreview(String urls, Model model, HttpServletRequest req) throws UnsupportedEncodingException {
public String picturesPreview(String urls, String currentUrl, Model model, HttpServletRequest req) throws UnsupportedEncodingException {
// 路径转码
String decodedUrl = URLDecoder.decode(urls, "utf-8");
String decodedCurrentUrl = URLDecoder.decode(currentUrl, "utf-8");
// 抽取文件并返回文件列表
String[] imgs = decodedUrl.split("|");
String[] imgs = decodedUrl.split("\\|");
List imgurls = Arrays.asList(imgs);
model.addAttribute("imgurls", imgurls);
model.addAttribute("currentUrl",decodedCurrentUrl);
return "picture";
}
@RequestMapping(value = "picturesPreview", method = RequestMethod.POST)
public String picturesPreview(Model model, HttpServletRequest req) throws UnsupportedEncodingException {
String urls = req.getParameter("urls");
String currentUrl = req.getParameter("currentUrl");
// 路径转码
String decodedUrl = URLDecoder.decode(urls, "utf-8");
String decodedCurrentUrl = URLDecoder.decode(currentUrl, "utf-8");
// 抽取文件并返回文件列表
String[] imgs = decodedUrl.split("\\|");
List imgurls = Arrays.asList(imgs);
model.addAttribute("imgurls", imgurls);
model.addAttribute("currentUrl",decodedCurrentUrl);
return "picture";
}
/**
* 根据url获取文件内容
* 当pdfjs读取存在跨域问题的文件时将通过此接口读取
@ -95,4 +119,16 @@ public class OnlinePreviewController {
}
}
/**
* 通过api接口入队
* @param url 请编码后在入队
*/
@GetMapping("/addTask")
@ResponseBody
public String addQueueTask(String url) {
final RBlockingQueue<String> queue = redissonClient.getBlockingQueue(FileConverQueueTask.queueTaskName);
queue.addAsync(url);
return "success";
}
}

View File

@ -1,14 +1,15 @@
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
spring.redisson.address = 192.168.1.204:6379
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
file.dir = C:\\Users\\yudian\\Desktop\\dev\\
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
spring.redisson.address = 127.0.0.1:6379
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
file.dir = /Users/chenkailing/test/
spring.resources.static-locations = classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${file.dir}
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
office.home = C:\\Program Files (x86)\\OpenOffice 4
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
office.home = /Applications/LibreOffice.app/Contents
server.tomcat.uri-encoding = UTF-8
converted.file.charset = GBK
#======================================#<23>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>#======================================#
#======================================#<23>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>#======================================#
spring.http.multipart.max-file-size=100MB
spring.http.multipart.max-request-size=100MB
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,mp3,mp4,sql
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,sql
media=mp3,mp4,flv,rmvb

View File

@ -1,18 +1,19 @@
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
spring.redisson.address = 10.19.140.7:6379
spring.redisson.database = 0
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
file.dir = /data/file-preview/convertedFile/
spring.resources.static-locations = classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${file.dir}
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
office.home = /opt/openoffice4
## <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
## <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
server.tomcat.uri-encoding = utf-8
converted.file.charset = utf-8
## <20>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD>ֵ
## <20>ļ<EFBFBD><C4BC>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD>ֵ
spring.http.multipart.max-file-size = 100MB
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,log,htm,mp3,mp4,css,cnf
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,log,htm,css,cnf
media=mp3,mp4,flv

View File

@ -1,14 +1,15 @@
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
#=============================================#spring Redisson<6F><6E><EFBFBD><EFBFBD>#===================================#
spring.redisson.address = 192.168.1.204:6379
spring.redisson.database = 3
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
##<23><>Դӳ<D4B4><D3B3>·<EFBFBD><C2B7>(<28><>Ϊjar<61><72>ʽ<EFBFBD><CABD><EFBFBD>е<EFBFBD>ԭ<EFBFBD><D4AD>)
file.dir = /data/filepreview/
spring.resources.static-locations = classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/,file:${file.dir}
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
## openoffice<63><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
openOfficePath = 123
office.home = /opt/openoffice4
server.tomcat.uri-encoding = utf-8
converted.file.charset = utf-8
spring.http.multipart.max-file-size = 100MB
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,log,htm,mp3,mp4,css,cnf
## ֧<>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
simText = txt,html,xml,java,properties,sql,js,md,json,conf,ini,vue,php,py,bat,gitignore,log,htm,css,cnf
media=mp3,mp4,flv

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg"><symbol id="plyr-captions-off" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol><symbol id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol><symbol id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol><symbol id="plyr-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol><symbol id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol><symbol id="plyr-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol><symbol id="plyr-pause" viewBox="0 0 18 18"><path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zM12 1c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/></symbol><symbol id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225C3.052-.337 2 .225 2 1.125v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/></symbol><symbol id="plyr-restart" viewBox="0 0 18 18"><path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"/></symbol><symbol id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol><symbol id="plyr-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"/><path d="M11.282 5.282a.909.909 0 0 0 0 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 0 0 0 1.316c.145.145.636.262 1.018.156a.725.725 0 0 0 .298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 0 0-1.316 0zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>多媒体文件预览</title>
<link rel="stylesheet" href="plyr/plyr.css">
</head>
<style>
body{background-color: #262626}
.m{ margin-left: auto; margin-right: auto; width:640px; margin-top: 100px; }
</style>
<body>
<div class="m">
<video controls>
<source src="${mediaUrl}">
</video>
</div>
<script src="plyr/plyr.js"></script>
<script>
plyr.setup();
</script>
</body>
</html>