mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-04-30 12:06:46 +00:00
Compare commits
93 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0aabf831ba | ||
|
|
d3f92b175c | ||
|
|
031db0b7d5 | ||
|
|
523623698a | ||
|
|
f714dffe70 | ||
|
|
7a9ad7546c | ||
|
|
138e58a1e1 | ||
|
|
55ca17203f | ||
|
|
8916bee786 | ||
|
|
c055d3d992 | ||
|
|
7b699e08fc | ||
|
|
c7367dfcec | ||
|
|
75a46a14a8 | ||
|
|
181897ec5a | ||
|
|
e5e9611646 | ||
|
|
78d517a16e | ||
|
|
e855c9c7ed | ||
|
|
195f56e9b9 | ||
|
|
888e550453 | ||
|
|
f771d361ae | ||
|
|
2cd23b06f1 | ||
|
|
75e568e15f | ||
|
|
60b91eb79f | ||
|
|
dd7a6465aa | ||
|
|
4cd6a4e4b9 | ||
|
|
3942346f49 | ||
|
|
e697c255fc | ||
|
|
65fa326262 | ||
|
|
81043034f9 | ||
|
|
6c5bceba41 | ||
|
|
b524963892 | ||
|
|
dd4997cedc | ||
|
|
ead5505d53 | ||
|
|
bf6cee4a6a | ||
|
|
bd458bfbe9 | ||
|
|
7895597176 | ||
|
|
a44e5ba518 | ||
|
|
cc7da00001 | ||
|
|
41449aeea6 | ||
|
|
33277bc457 | ||
|
|
f2cfb4cf4a | ||
|
|
d646d72a26 | ||
|
|
1807dbd615 | ||
|
|
1e771ed649 | ||
|
|
83d04ca45d | ||
|
|
ee2dadb40d | ||
|
|
c9eb51213f | ||
|
|
81f28baabf | ||
|
|
1245e9f327 | ||
|
|
007889339b | ||
|
|
9cf5e8691d | ||
|
|
ff1bfe5f98 | ||
|
|
c2c870668b | ||
|
|
b7ed284ae9 | ||
|
|
e33db39494 | ||
|
|
f13cccf5a6 | ||
|
|
c355c915f8 | ||
|
|
92a95db34c | ||
|
|
1a821706ee | ||
|
|
604e118036 | ||
|
|
871a83e3b5 | ||
|
|
6d3f9e7cfc | ||
|
|
b5e281a3b1 | ||
|
|
60d9ef7069 | ||
|
|
98a7217b10 | ||
|
|
a867effa68 | ||
|
|
058ebd8274 | ||
|
|
784eec99de | ||
|
|
3e2e330fcb | ||
|
|
e50a664e64 | ||
|
|
94503ddc39 | ||
|
|
99bdeef754 | ||
|
|
e08c41baa9 | ||
|
|
ca9eefb80b | ||
|
|
4962b8b3ca | ||
|
|
eb372686e6 | ||
|
|
daf506e1bd | ||
|
|
b239d5b440 | ||
|
|
09a3fd2db8 | ||
|
|
eb12ced77f | ||
|
|
5521386781 | ||
|
|
24698be8be | ||
|
|
6183e8c3e5 | ||
|
|
cdc146747b | ||
|
|
ca9fcf6cf6 | ||
|
|
daa081d46d | ||
|
|
be23560ee4 | ||
|
|
134ff34c5e | ||
|
|
f9e5fd01be | ||
|
|
e278d8f049 | ||
|
|
7a25e0cb34 | ||
|
|
e25cc2e47c | ||
|
|
8cb310ef93 |
@@ -1,5 +1,5 @@
|
|||||||
FROM keking/kkfileview-jdk:4.1.1
|
FROM keking/kkfileview-jdk:4.1.1
|
||||||
MAINTAINER chenjh "842761733@qq.com"
|
MAINTAINER chenjh "842761733@qq.com"
|
||||||
ADD server/target/kkFileView-*.tar.gz /opt/
|
ADD server/target/kkFileView-*.tar.gz /opt/
|
||||||
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.2.0-SNAPSHOT/bin
|
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.2.1/bin
|
||||||
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.2.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-4.2.0-SNAPSHOT/bin/kkFileView-4.2.0-SNAPSHOT.jar"]
|
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.2.1/config/application.properties","-jar","/opt/kkFileView-4.2.1/bin/kkFileView-4.2.1.jar"]
|
||||||
|
|||||||
18
README.cn.md
18
README.cn.md
@@ -1,14 +1,16 @@
|
|||||||
# kkFileView
|
# kkFileView
|
||||||
文档在线预览项目解决方案,项目使用流行的spring boot搭建,易上手和部署。万能的文件预览开源项目,基本支持主流文档格式预览,如:
|
文档在线预览项目解决方案,项目使用流行的spring boot搭建,易上手和部署。万能的文件预览开源项目,基本支持主流文档格式预览,如:
|
||||||
1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv 等 Office 办公文档
|
1. 支持 doc, docx, xls, xlsx, xlsm, ppt, pptx, csv, tsv, dotm, xlt, xltm, dot, dotx,xlam, xla 等 Office 办公文档
|
||||||
2. 支持 wps, dps, et 等国产 WPS Office 办公文档
|
2. 支持 wps, dps, et, ett, wpt 等国产 WPS Office 办公文档
|
||||||
3. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOffice、LibreOffice 办公文档
|
3. 支持 odt, ods, ots, odp, otp, six, ott, fodt, fods 等OpenOffice、LibreOffice 办公文档
|
||||||
4. 支持 vsd, vsdx 等 Visio 流程图文件
|
4. 支持 vsd, vsdx 等 Visio 流程图文件
|
||||||
5. 支持 wmf, emf 等 Windows 系统图像文件
|
5. 支持 wmf, emf 等 Windows 系统图像文件
|
||||||
6. 支持 psd 等 Photoshop 软件模型文件
|
6. 支持 psd 等 Photoshop 软件模型文件
|
||||||
7. 支持 pdf ,ofd, rtf 等文档
|
7. 支持 pdf ,ofd, rtf 等文档
|
||||||
8. 支持 xmind 软件模型文件
|
8. 支持 xmind 软件模型文件
|
||||||
9. 支持 eml, epub 文档类型文件
|
9. 支持 bpmn 工作流文件
|
||||||
|
9. 支持 eml 邮件文件
|
||||||
|
10. 支持 epub 图书文档
|
||||||
10. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
|
10. 支持 obj, 3ds, stl, ply, gltf, glb, off, 3dm, fbx, dae, wrl, 3mf, ifc, brep, step, iges, fcstd, bim 等 3D 模型文件
|
||||||
11. 支持 dwg, dxf 等 CAD 模型文件
|
11. 支持 dwg, dxf 等 CAD 模型文件
|
||||||
12. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
|
12. 支持 txt, xml(渲染), md(渲染), java, php, py, js, css 等所有纯文本
|
||||||
@@ -17,7 +19,8 @@
|
|||||||
15. 支持 tif, tiff 图信息模型文件
|
15. 支持 tif, tiff 图信息模型文件
|
||||||
16. 支持 tga 图像格式文件
|
16. 支持 tga 图像格式文件
|
||||||
17. 支持 svg 矢量图像格式文件
|
17. 支持 svg 矢量图像格式文件
|
||||||
18. 支持 avi, mov, wmv, mkv, 3gp, rm 等众多音视频格式文件
|
18. 支持 mp3,wav,mp4,flv 等音视频格式文件
|
||||||
|
19. 支持 avi,mov,rm,webm,ts,rm,mkv,mpeg,ogg,mpg,rmvb,wmv,3gp,ts,swf 等视频格式转码预览
|
||||||
|
|
||||||
> 基于当前良好的架构模式,支持的文件类型在进一步丰富中
|
> 基于当前良好的架构模式,支持的文件类型在进一步丰富中
|
||||||
### 项目特性
|
### 项目特性
|
||||||
@@ -34,7 +37,7 @@
|
|||||||
### 在线体验
|
### 在线体验
|
||||||
> 请善待公共服务,会不定时停用
|
> 请善待公共服务,会不定时停用
|
||||||
|
|
||||||
地址:[https://kkview.cn/preview/index](https://kkview.cn/preview/index)
|
地址:[https://file.kkview.cn](https://file.kkview.cn)
|
||||||
|
|
||||||
### 项目文档(Project documentation)
|
### 项目文档(Project documentation)
|
||||||
1. 详细wiki文档:https://gitee.com/kekingcn/file-online-preview/wikis/pages
|
1. 详细wiki文档:https://gitee.com/kekingcn/file-online-preview/wikis/pages
|
||||||
@@ -44,8 +47,7 @@
|
|||||||
### 联系我们,加入组织
|
### 联系我们,加入组织
|
||||||
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少 Google 或 baidu 过,珍爱生命远离无效的交流沟通
|
> 我们会用心回答解决大家在项目使用中的问题,也请大家在提问前至少 Google 或 baidu 过,珍爱生命远离无效的交流沟通
|
||||||
|
|
||||||

|
<img src="./doc/gitee星球.png/" width="60%">
|
||||||
|
|
||||||
|
|
||||||
### 文档预览效果
|
### 文档预览效果
|
||||||
#### 1. 文本预览
|
#### 1. 文本预览
|
||||||
@@ -275,7 +277,7 @@ epub 引用于 [ epub.js](https://github.com/futurepress/epub.js) 开源协议
|
|||||||
[](https://starchart.cc/kekingcn/kkFileView)
|
[](https://starchart.cc/kekingcn/kkFileView)
|
||||||
|
|
||||||
### 鸣谢
|
### 鸣谢
|
||||||
- 本项目诞生于[凯京集团],在取得公司高层同意后以 Apache 协议开源出来反哺社区,在此特别感谢凯京集团,以及集团领导@唐老大的支持、@端木详笑的贡献。
|
- 本项目诞生于[凯京集团],在取得公司高层同意后以 Apache 协议开源出来反哺社区,在此特别感谢凯京集团,以及集团领导[@唐老大](https://github.com/tangshd)的支持、@端木详笑的贡献。
|
||||||
- 本项目已脱离公司由[KK开源社区]维护发展壮大,感谢所有给 kkFileView 提 Issue 、Pr 开发者
|
- 本项目已脱离公司由[KK开源社区]维护发展壮大,感谢所有给 kkFileView 提 Issue 、Pr 开发者
|
||||||
- 本项目引入的第三方组件已在 '关于引用' 列表列出,感谢这些项目,让 kkFileView 更出色
|
- 本项目引入的第三方组件已在 '关于引用' 列表列出,感谢这些项目,让 kkFileView 更出色
|
||||||
|
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -4,15 +4,17 @@
|
|||||||
|
|
||||||
Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:
|
Document online preview project solution, built using the popular Spring Boot framework for easy setup and deployment. This versatile open source project provides basic support for a wide range of document formats, including:
|
||||||
|
|
||||||
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, etc.
|
1. Supports Office documents such as `doc`, `docx`, `xls`, `xlsx`, `xlsm`, `ppt`, `pptx`, `csv`, `tsv`, , `dotm`, `xlt`, `xltm`, `dot`, `xlam`, `dotx`, `xla,` etc.
|
||||||
2. Supports domestic WPS Office documents such as `wps`, `dps`, et.
|
2. Supports domestic WPS Office documents such as `wps`, `dps`, `et` , `ett`, ` wpt`.
|
||||||
3. Supports OpenOffice, LibreOffice office documents such as `odt`, `ods`, `ots`, `odp`, `otp`, `six`, `ott`, `fodt` and `fods`.
|
3. Supports OpenOffice, LibreOffice office documents such as `odt`, `ods`, `ots`, `odp`, `otp`, `six`, `ott`, `fodt` and `fods`.
|
||||||
4. Supports Visio flowchart files such as `vsd`, `vsdx`.
|
4. Supports Visio flowchart files such as `vsd`, `vsdx`.
|
||||||
5. Supports Windows system image files such as `wmf`, `emf`.
|
5. Supports Windows system image files such as `wmf`, `emf`.
|
||||||
6. Supports Photoshop software model files such as `psd`.
|
6. Supports Photoshop software model files such as `psd`.
|
||||||
7. Supports document formats like `pdf`, `ofd`, and `rtf`.
|
7. Supports document formats like `pdf`, `ofd`, and `rtf`.
|
||||||
8. Supports software model files like `xmind`.
|
8. Supports software model files like `xmind`.
|
||||||
9. Supports document type files such as `eml`, `epub`.
|
9. Support for `bpmn` workflow files.
|
||||||
|
9. Support for `eml` mail files
|
||||||
|
10. Support for `epub` book documents
|
||||||
10. Supports 3D model files like `obj`, `3ds`, `stl`, `ply`, `gltf`, `glb`, `off`, `3dm`, `fbx`, `dae`, `wrl`, `3mf`, `ifc`, `brep`, `step`, `iges`, `fcstd`, `bim`, etc.
|
10. Supports 3D model files like `obj`, `3ds`, `stl`, `ply`, `gltf`, `glb`, `off`, `3dm`, `fbx`, `dae`, `wrl`, `3mf`, `ifc`, `brep`, `step`, `iges`, `fcstd`, `bim`, etc.
|
||||||
11. Supports CAD model files such as `dwg`, `dxf`.
|
11. Supports CAD model files such as `dwg`, `dxf`.
|
||||||
12. Supports all plain text files such as `txt`, `xml` (rendering), `md` (rendering), `java`, `php`, `py`, `js`, `css`, etc.
|
12. Supports all plain text files such as `txt`, `xml` (rendering), `md` (rendering), `java`, `php`, `py`, `js`, `css`, etc.
|
||||||
@@ -37,7 +39,12 @@ URL:[https://kkview.cn](https://kkview.cn/)
|
|||||||
### Live demo
|
### Live demo
|
||||||
> Please treat public service kindly, or this would stop at any time.
|
> Please treat public service kindly, or this would stop at any time.
|
||||||
|
|
||||||
URL:[https://kkview.cn/preview/index](https://kkview.cn/preview/index)
|
URL:[https://file.kkview.cn](https://file.kkview.cn)
|
||||||
|
|
||||||
|
### Contact Us
|
||||||
|
> We will answer your questions carefully and solve any problems you encounter while using the project. We also kindly ask that you at least Google or Baidu before asking questions in order to save time and avoid ineffective communication. Let's cherish our lives and stay away from ineffective communication.
|
||||||
|
|
||||||
|
<img src="./doc/github星球.png/" width="50%">
|
||||||
|
|
||||||
### Quick Start
|
### Quick Start
|
||||||
> Technology stack
|
> Technology stack
|
||||||
|
|||||||
BIN
doc/gitee星球.png
Normal file
BIN
doc/gitee星球.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
BIN
doc/github星球.png
Normal file
BIN
doc/github星球.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 148 KiB |
BIN
doc/知识星球.png
BIN
doc/知识星球.png
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
12
pom.xml
12
pom.xml
@@ -6,24 +6,24 @@
|
|||||||
|
|
||||||
<groupId>cn.keking</groupId>
|
<groupId>cn.keking</groupId>
|
||||||
<artifactId>kkFileView-parent</artifactId>
|
<artifactId>kkFileView-parent</artifactId>
|
||||||
<version>4.2.0-SNAPSHOT</version>
|
<version>4.2.1</version>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
|
|
||||||
<jodconverter.version>4.4.5</jodconverter.version>
|
<jodconverter.version>4.4.6</jodconverter.version>
|
||||||
<spring.boot.version>2.4.2</spring.boot.version>
|
<spring.boot.version>2.4.2</spring.boot.version>
|
||||||
<poi.version>5.2.2</poi.version>
|
<poi.version>5.2.2</poi.version>
|
||||||
<xdocreport.version>1.0.6</xdocreport.version>
|
<xdocreport.version>1.0.6</xdocreport.version>
|
||||||
<xstream.version>1.4.19</xstream.version>
|
<xstream.version>1.4.20</xstream.version>
|
||||||
<junrar.version>7.4.1</junrar.version>
|
<junrar.version>7.5.4</junrar.version>
|
||||||
<redisson.version>3.2.0</redisson.version>
|
<redisson.version>3.2.0</redisson.version>
|
||||||
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
|
<sevenzipjbinding.version>16.02-2.01</sevenzipjbinding.version>
|
||||||
<jchardet.version>1.0</jchardet.version>
|
<jchardet.version>1.0</jchardet.version>
|
||||||
<antlr.version>2.7.7</antlr.version>
|
<antlr.version>2.7.7</antlr.version>
|
||||||
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
|
<concurrentlinkedhashmap.version>1.4.2</concurrentlinkedhashmap.version>
|
||||||
<rocksdb.version>5.17.2</rocksdb.version>
|
<rocksdb.version>5.17.2</rocksdb.version>
|
||||||
<pdfbox.version>2.0.26</pdfbox.version>
|
<pdfbox.version>2.0.27</pdfbox.version>
|
||||||
<jai-imageio.version>1.4.0</jai-imageio.version>
|
<jai-imageio.version>1.4.0</jai-imageio.version>
|
||||||
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
|
<jbig2-imageio.version>3.0.4</jbig2-imageio.version>
|
||||||
<galimatias.version>0.2.1</galimatias.version>
|
<galimatias.version>0.2.1</galimatias.version>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<opencv.version>4.1.2-1.5.2</opencv.version>
|
<opencv.version>4.1.2-1.5.2</opencv.version>
|
||||||
<openblas.version>0.3.6-1.5.1</openblas.version>
|
<openblas.version>0.3.6-1.5.1</openblas.version>
|
||||||
<ffmpeg.version>4.2.1-1.5.2</ffmpeg.version>
|
<ffmpeg.version>4.2.1-1.5.2</ffmpeg.version>
|
||||||
<itext.version>2.1.7</itext.version>
|
<itextpdf.version>5.5.13.3</itextpdf.version>
|
||||||
<httpclient.version>3.1</httpclient.version>
|
<httpclient.version>3.1</httpclient.version>
|
||||||
|
|
||||||
<commons-cli.version>1.2</commons-cli.version>
|
<commons-cli.version>1.2</commons-cli.version>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>kkFileView-parent</artifactId>
|
<artifactId>kkFileView-parent</artifactId>
|
||||||
<groupId>cn.keking</groupId>
|
<groupId>cn.keking</groupId>
|
||||||
<version>4.2.0-SNAPSHOT</version>
|
<version>4.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>kkFileView</artifactId>
|
<artifactId>kkFileView</artifactId>
|
||||||
@@ -244,10 +244,10 @@
|
|||||||
<classifier>windows-x86_64</classifier>
|
<classifier>windows-x86_64</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.lowagie</groupId>
|
<groupId>com.itextpdf</groupId>
|
||||||
<artifactId>itext</artifactId>
|
<artifactId>itextpdf</artifactId>
|
||||||
<version>${itext.version}</version>
|
<version>${itextpdf.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.media</groupId>
|
<groupId>javax.media</groupId>
|
||||||
@@ -338,4 +338,4 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
@@ -7,4 +7,4 @@ echo Please check log file in ../log/kkFileView.log for more information
|
|||||||
echo You can get help in our official home site: https://kkview.cn
|
echo You can get help in our official home site: https://kkview.cn
|
||||||
echo If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ
|
echo If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ
|
||||||
echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers
|
echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers
|
||||||
java -Dspring.config.location=..\config\application.properties -jar kkFileView-4.2.0-SNAPSHOT.jar -> ..\log\kkFileView.log
|
java -Dspring.config.location=..\config\application.properties -jar kkFileView-4.2.1.jar -> ..\log\kkFileView.log
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ else
|
|||||||
|
|
||||||
## 启动kkFileView
|
## 启动kkFileView
|
||||||
echo "Starting kkFileView..."
|
echo "Starting kkFileView..."
|
||||||
nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar kkFileView-4.2.0-SNAPSHOT.jar > ../log/kkFileView.log 2>&1 &
|
nohup java -Dfile.encoding=UTF-8 -Dspring.config.location=../config/application.properties -jar kkFileView-4.2.1.jar > ../log/kkFileView.log 2>&1 &
|
||||||
echo "Please execute ./showlog.sh to check log for more information"
|
echo "Please execute ./showlog.sh to check log for more information"
|
||||||
echo "You can get help in our official home site: https://kkview.cn"
|
echo "You can get help in our official home site: https://kkview.cn"
|
||||||
echo "If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ"
|
echo "If you need further help, please join our kk opensource community: https://t.zsxq.com/09ZHSXbsQ"
|
||||||
|
|||||||
@@ -2,8 +2,9 @@
|
|||||||
server.port = ${KK_SERVER_PORT:8012}
|
server.port = ${KK_SERVER_PORT:8012}
|
||||||
server.servlet.context-path= ${KK_CONTEXT_PATH:/}
|
server.servlet.context-path= ${KK_CONTEXT_PATH:/}
|
||||||
server.servlet.encoding.charset = utf-8
|
server.servlet.encoding.charset = utf-8
|
||||||
#文件上传限制
|
#文件上传限制前端
|
||||||
spring.servlet.multipart.max-file-size=500MB
|
spring.servlet.multipart.max-file-size=500MB
|
||||||
|
#文件上传限制
|
||||||
spring.servlet.multipart.max-request-size=500MB
|
spring.servlet.multipart.max-request-size=500MB
|
||||||
## Freemarker 配置
|
## Freemarker 配置
|
||||||
spring.freemarker.template-loader-path = classpath:/web/
|
spring.freemarker.template-loader-path = classpath:/web/
|
||||||
@@ -117,3 +118,9 @@ watermark.angle = ${WATERMARK_ANGLE:10}
|
|||||||
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
||||||
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
||||||
|
|
||||||
|
# 备案信息
|
||||||
|
BeiAn =
|
||||||
|
#禁止上传类型
|
||||||
|
prohibit =exe,dll,dat
|
||||||
|
#删除密码
|
||||||
|
sc.password =123456
|
||||||
|
|||||||
@@ -42,6 +42,10 @@ public class ConfigConstants {
|
|||||||
private static String pdfBookmarkDisable;
|
private static String pdfBookmarkDisable;
|
||||||
private static Boolean fileUploadDisable;
|
private static Boolean fileUploadDisable;
|
||||||
private static String tifPreviewType;
|
private static String tifPreviewType;
|
||||||
|
private static String BeiAn;
|
||||||
|
private static String[] prohibit= {};
|
||||||
|
private static String size;
|
||||||
|
private static String password;
|
||||||
|
|
||||||
public static final String DEFAULT_CACHE_ENABLED = "true";
|
public static final String DEFAULT_CACHE_ENABLED = "true";
|
||||||
public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd";
|
public static final String DEFAULT_TXT_TYPE = "txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd";
|
||||||
@@ -62,6 +66,10 @@ public class ConfigConstants {
|
|||||||
public static final String DEFAULT_PDF_BOOKMARK_DISABLE = "true";
|
public static final String DEFAULT_PDF_BOOKMARK_DISABLE = "true";
|
||||||
public static final String DEFAULT_FILE_UPLOAD_DISABLE = "false";
|
public static final String DEFAULT_FILE_UPLOAD_DISABLE = "false";
|
||||||
public static final String DEFAULT_TIF_PREVIEW_TYPE = "tif";
|
public static final String DEFAULT_TIF_PREVIEW_TYPE = "tif";
|
||||||
|
public static final String DEFAULT_BeiAn_DISABLE = "无";
|
||||||
|
public static final String DEFAULT_size_DISABLE = "500MB";
|
||||||
|
public static final String DEFAULT_prohibit_DISABLE = "exe,dll";
|
||||||
|
public static final String DEFAULT_password_DISABLE = "123456";
|
||||||
|
|
||||||
public static Boolean isCacheEnabled() {
|
public static Boolean isCacheEnabled() {
|
||||||
return cacheEnabled;
|
return cacheEnabled;
|
||||||
@@ -353,4 +361,49 @@ public class ConfigConstants {
|
|||||||
public static void setTifPreviewTypeValue(String tifPreviewType) {
|
public static void setTifPreviewTypeValue(String tifPreviewType) {
|
||||||
ConfigConstants.tifPreviewType = tifPreviewType;
|
ConfigConstants.tifPreviewType = tifPreviewType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String getBeiAn() {
|
||||||
|
return BeiAn;
|
||||||
|
}
|
||||||
|
@Value("${BeiAn:无}")
|
||||||
|
public void setBeiAn(String BeiAn) {
|
||||||
|
setBeiAnValue(BeiAn);
|
||||||
|
}
|
||||||
|
public static void setBeiAnValue(String BeiAn) {
|
||||||
|
ConfigConstants.BeiAn = BeiAn;
|
||||||
|
}
|
||||||
|
public static String[] getprohibit() {
|
||||||
|
return prohibit;
|
||||||
|
}
|
||||||
|
@Value("${prohibit:exe,dll}")
|
||||||
|
public void setprohibit(String prohibit) {
|
||||||
|
String[] prohibittArr = prohibit.split(",");
|
||||||
|
setprohibitValue(prohibittArr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setprohibitValue(String[] prohibit) {
|
||||||
|
ConfigConstants.prohibit = prohibit;
|
||||||
|
}
|
||||||
|
public static String maxsize() {
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
@Value("${spring.servlet.multipart.max-file-size:500MB}")
|
||||||
|
public void setsize(String size) {
|
||||||
|
setsizeValue(size);
|
||||||
|
}
|
||||||
|
public static void setsizeValue(String size) {
|
||||||
|
ConfigConstants.size = size;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getpassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
@Value("${sc.password:123456}")
|
||||||
|
public void setpassword(String password) {
|
||||||
|
setpasswordValue(password);
|
||||||
|
}
|
||||||
|
public static void setpasswordValue(String password) {
|
||||||
|
ConfigConstants.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,11 @@ public class ConfigRefreshComponent {
|
|||||||
String pdfBookmarkDisable;
|
String pdfBookmarkDisable;
|
||||||
boolean fileUploadDisable;
|
boolean fileUploadDisable;
|
||||||
String tifPreviewType;
|
String tifPreviewType;
|
||||||
|
String prohibit;
|
||||||
|
String[] prohibitArray;
|
||||||
|
String BeiAn;
|
||||||
|
String size;
|
||||||
|
String password;
|
||||||
while (true) {
|
while (true) {
|
||||||
FileReader fileReader = new FileReader(configFilePath);
|
FileReader fileReader = new FileReader(configFilePath);
|
||||||
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
BufferedReader bufferedReader = new BufferedReader(fileReader);
|
||||||
@@ -78,6 +82,11 @@ public class ConfigRefreshComponent {
|
|||||||
pdfBookmarkDisable = properties.getProperty("pdf.bookmark.disable", ConfigConstants.DEFAULT_PDF_BOOKMARK_DISABLE);
|
pdfBookmarkDisable = properties.getProperty("pdf.bookmark.disable", ConfigConstants.DEFAULT_PDF_BOOKMARK_DISABLE);
|
||||||
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
fileUploadDisable = Boolean.parseBoolean(properties.getProperty("file.upload.disable", ConfigConstants.DEFAULT_FILE_UPLOAD_DISABLE));
|
||||||
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
tifPreviewType = properties.getProperty("tif.preview.type", ConfigConstants.DEFAULT_TIF_PREVIEW_TYPE);
|
||||||
|
size = properties.getProperty("spring.servlet.multipart.max-file-size", ConfigConstants.DEFAULT_size_DISABLE);
|
||||||
|
BeiAn = properties.getProperty("BeiAn", ConfigConstants.DEFAULT_BeiAn_DISABLE);
|
||||||
|
prohibit = properties.getProperty("prohibit", ConfigConstants.DEFAULT_prohibit_DISABLE);
|
||||||
|
password = properties.getProperty("sc.password", ConfigConstants.DEFAULT_password_DISABLE);
|
||||||
|
prohibitArray = prohibit.split(",");
|
||||||
|
|
||||||
ConfigConstants.setCacheEnabledValueValue(cacheEnabled);
|
ConfigConstants.setCacheEnabledValueValue(cacheEnabled);
|
||||||
ConfigConstants.setSimTextValue(textArray);
|
ConfigConstants.setSimTextValue(textArray);
|
||||||
@@ -96,6 +105,10 @@ public class ConfigRefreshComponent {
|
|||||||
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
ConfigConstants.setPdfBookmarkDisableValue(pdfBookmarkDisable);
|
||||||
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
ConfigConstants.setFileUploadDisableValue(fileUploadDisable);
|
||||||
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
ConfigConstants.setTifPreviewTypeValue(tifPreviewType);
|
||||||
|
ConfigConstants.setBeiAnValue(BeiAn);
|
||||||
|
ConfigConstants.setsizeValue(size);
|
||||||
|
ConfigConstants.setprohibitValue(prohibitArray);
|
||||||
|
ConfigConstants.setpasswordValue(password);
|
||||||
setWatermarkConfig(properties);
|
setWatermarkConfig(properties);
|
||||||
bufferedReader.close();
|
bufferedReader.close();
|
||||||
fileReader.close();
|
fileReader.close();
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ public class WebConfig implements WebMvcConfigurer {
|
|||||||
Set<String> filterUri = new HashSet<>();
|
Set<String> filterUri = new HashSet<>();
|
||||||
filterUri.add("/onlinePreview");
|
filterUri.add("/onlinePreview");
|
||||||
filterUri.add("/picturesPreview");
|
filterUri.add("/picturesPreview");
|
||||||
|
filterUri.add("/getCorsFile");
|
||||||
TrustHostFilter filter = new TrustHostFilter();
|
TrustHostFilter filter = new TrustHostFilter();
|
||||||
FilterRegistrationBean<TrustHostFilter> registrationBean = new FilterRegistrationBean<>();
|
FilterRegistrationBean<TrustHostFilter> registrationBean = new FilterRegistrationBean<>();
|
||||||
registrationBean.setFilter(filter);
|
registrationBean.setFilter(filter);
|
||||||
@@ -67,6 +68,7 @@ public class WebConfig implements WebMvcConfigurer {
|
|||||||
public FilterRegistrationBean<BaseUrlFilter> getBaseUrlFilter() {
|
public FilterRegistrationBean<BaseUrlFilter> getBaseUrlFilter() {
|
||||||
Set<String> filterUri = new HashSet<>();
|
Set<String> filterUri = new HashSet<>();
|
||||||
filterUri.add("/index");
|
filterUri.add("/index");
|
||||||
|
filterUri.add("/");
|
||||||
filterUri.add("/onlinePreview");
|
filterUri.add("/onlinePreview");
|
||||||
filterUri.add("/picturesPreview");
|
filterUri.add("/picturesPreview");
|
||||||
BaseUrlFilter filter = new BaseUrlFilter();
|
BaseUrlFilter filter = new BaseUrlFilter();
|
||||||
@@ -80,6 +82,7 @@ public class WebConfig implements WebMvcConfigurer {
|
|||||||
public FilterRegistrationBean<AttributeSetFilter> getWatermarkConfigFilter() {
|
public FilterRegistrationBean<AttributeSetFilter> getWatermarkConfigFilter() {
|
||||||
Set<String> filterUri = new HashSet<>();
|
Set<String> filterUri = new HashSet<>();
|
||||||
filterUri.add("/index");
|
filterUri.add("/index");
|
||||||
|
filterUri.add("/");
|
||||||
filterUri.add("/onlinePreview");
|
filterUri.add("/onlinePreview");
|
||||||
filterUri.add("/picturesPreview");
|
filterUri.add("/picturesPreview");
|
||||||
AttributeSetFilter filter = new AttributeSetFilter();
|
AttributeSetFilter filter = new AttributeSetFilter();
|
||||||
|
|||||||
@@ -29,9 +29,10 @@ public enum FileType {
|
|||||||
Online3D("online3DFilePreviewImpl"),
|
Online3D("online3DFilePreviewImpl"),
|
||||||
XMIND("xmindFilePreviewImpl"),
|
XMIND("xmindFilePreviewImpl"),
|
||||||
SVG("svgFilePreviewImpl"),
|
SVG("svgFilePreviewImpl"),
|
||||||
Epub("epubFilePreviewImpl");
|
Epub("epubFilePreviewImpl"),
|
||||||
|
BPMN("bpmnFilePreviewImpl");
|
||||||
|
|
||||||
private static final String[] OFFICE_TYPES = {"docx", "wps", "doc", "docm", "xls", "xlsx", "csv" ,"xlsm", "ppt", "pptx", "vsd", "rtf", "odt", "wmf", "emf", "dps", "et", "ods", "ots", "tsv", "odp", "otp", "sxi", "ott", "vsdx", "fodt", "fods", "xltx","tga","psd"};
|
private static final String[] OFFICE_TYPES = {"docx", "wps", "doc", "docm", "xls", "xlsx", "csv" ,"xlsm", "ppt", "pptx", "vsd", "rtf", "odt", "wmf", "emf", "dps", "et", "ods", "ots", "tsv", "odp", "otp", "sxi", "ott", "vsdx", "fodt", "fods", "xltx","tga","psd","dotm","ett","xlt","xltm","wpt","dot","xlam","dotx","xla"};
|
||||||
private static final String[] PICTURE_TYPES = {"jpg", "jpeg", "png", "gif", "bmp", "ico", "jfif", "webp"};
|
private static final String[] PICTURE_TYPES = {"jpg", "jpeg", "png", "gif", "bmp", "ico", "jfif", "webp"};
|
||||||
private static final String[] ARCHIVE_TYPES = {"rar", "zip", "jar", "7-zip", "tar", "gzip", "7z"};
|
private static final String[] ARCHIVE_TYPES = {"rar", "zip", "jar", "7-zip", "tar", "gzip", "7z"};
|
||||||
private static final String[] Online3D_TYPES = {"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"};
|
private static final String[] Online3D_TYPES = {"obj", "3ds", "stl", "ply", "off", "3dm", "fbx", "dae", "wrl", "3mf", "ifc","glb","o3dv","gltf","stp","bim","fcstd","step","iges","brep"};
|
||||||
@@ -98,6 +99,7 @@ public enum FileType {
|
|||||||
FILE_TYPE_MAPPER.put("xml", FileType.XML);
|
FILE_TYPE_MAPPER.put("xml", FileType.XML);
|
||||||
FILE_TYPE_MAPPER.put("pdf", FileType.PDF);
|
FILE_TYPE_MAPPER.put("pdf", FileType.PDF);
|
||||||
FILE_TYPE_MAPPER.put("flv", FileType.FLV);
|
FILE_TYPE_MAPPER.put("flv", FileType.FLV);
|
||||||
|
FILE_TYPE_MAPPER.put("bpmn", FileType.BPMN);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static FileType to(String fileType) {
|
private static FileType to(String fileType) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,14 @@ import cn.keking.config.ConfigConstants;
|
|||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import cn.keking.model.FileType;
|
import cn.keking.model.FileType;
|
||||||
import cn.keking.service.cache.CacheService;
|
import cn.keking.service.cache.CacheService;
|
||||||
|
import cn.keking.service.cache.NotResourceCache;
|
||||||
|
import cn.keking.utils.EncodingDetects;
|
||||||
import cn.keking.utils.KkFileUtils;
|
import cn.keking.utils.KkFileUtils;
|
||||||
import cn.keking.utils.WebUtils;
|
import cn.keking.utils.WebUtils;
|
||||||
import com.aspose.cad.CodePages;
|
import com.aspose.cad.CodePages;
|
||||||
import com.aspose.cad.Color;
|
import com.aspose.cad.Color;
|
||||||
import com.aspose.cad.Image;
|
import com.aspose.cad.Image;
|
||||||
import com.aspose.cad.LoadOptions;
|
import com.aspose.cad.LoadOptions;
|
||||||
import com.aspose.cad.fileformats.cad.CadDrawTypeMode;
|
|
||||||
import com.aspose.cad.imageoptions.CadRasterizationOptions;
|
import com.aspose.cad.imageoptions.CadRasterizationOptions;
|
||||||
import com.aspose.cad.imageoptions.PdfOptions;
|
import com.aspose.cad.imageoptions.PdfOptions;
|
||||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||||
@@ -26,6 +27,8 @@ import org.springframework.util.StringUtils;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLDecoder;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -40,8 +43,6 @@ import java.util.Map;
|
|||||||
public class FileHandlerService {
|
public class FileHandlerService {
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(FileHandlerService.class);
|
private final Logger logger = LoggerFactory.getLogger(FileHandlerService.class);
|
||||||
|
|
||||||
private static final String DEFAULT_CONVERTER_CHARSET = System.getProperty("sun.jnu.encoding");
|
|
||||||
private final String fileDir = ConfigConstants.getFileDir();
|
private final String fileDir = ConfigConstants.getFileDir();
|
||||||
private final CacheService cacheService;
|
private final CacheService cacheService;
|
||||||
|
|
||||||
@@ -141,9 +142,10 @@ public class FileHandlerService {
|
|||||||
* @param outFilePath 文件绝对路径
|
* @param outFilePath 文件绝对路径
|
||||||
*/
|
*/
|
||||||
public void doActionConvertedFile(String outFilePath) {
|
public void doActionConvertedFile(String outFilePath) {
|
||||||
|
String charset = EncodingDetects.getJavaEncode(outFilePath);
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
try (InputStream inputStream = new FileInputStream(outFilePath);
|
try (InputStream inputStream = new FileInputStream(outFilePath);
|
||||||
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, DEFAULT_CONVERTER_CHARSET))) {
|
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, charset))) {
|
||||||
String line;
|
String line;
|
||||||
while (null != (line = reader.readLine())) {
|
while (null != (line = reader.readLine())) {
|
||||||
if (line.contains("charset=gb2312")) {
|
if (line.contains("charset=gb2312")) {
|
||||||
@@ -198,6 +200,7 @@ public class FileHandlerService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
PDDocument doc = PDDocument.load(pdfFile);
|
PDDocument doc = PDDocument.load(pdfFile);
|
||||||
|
doc.setResourceCache(new NotResourceCache());
|
||||||
int pageCount = doc.getNumberOfPages();
|
int pageCount = doc.getNumberOfPages();
|
||||||
PDFRenderer pdfRenderer = new PDFRenderer(doc);
|
PDFRenderer pdfRenderer = new PDFRenderer(doc);
|
||||||
|
|
||||||
@@ -272,6 +275,14 @@ public class FileHandlerService {
|
|||||||
FileType type;
|
FileType type;
|
||||||
String fileName;
|
String fileName;
|
||||||
String fullFileName = WebUtils.getUrlParameterReg(url, "fullfilename");
|
String fullFileName = WebUtils.getUrlParameterReg(url, "fullfilename");
|
||||||
|
String urlStrr = null;
|
||||||
|
URL urll;
|
||||||
|
try {
|
||||||
|
urll = new URL(url);
|
||||||
|
urlStrr = URLDecoder.decode(urll.getPath(), "UTF-8");
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
if (StringUtils.hasText(fullFileName)) {
|
if (StringUtils.hasText(fullFileName)) {
|
||||||
fileName = fullFileName;
|
fileName = fullFileName;
|
||||||
type = FileType.typeFromFileName(fullFileName);
|
type = FileType.typeFromFileName(fullFileName);
|
||||||
@@ -282,10 +293,12 @@ public class FileHandlerService {
|
|||||||
suffix = WebUtils.suffixFromUrl(url);
|
suffix = WebUtils.suffixFromUrl(url);
|
||||||
}
|
}
|
||||||
if (url.contains("?fileKey=")) {
|
if (url.contains("?fileKey=")) {
|
||||||
|
fileName=urlStrr;
|
||||||
attribute.setSkipDownLoad(true);
|
attribute.setSkipDownLoad(true);
|
||||||
}
|
}
|
||||||
|
// System.out.println(fileName);
|
||||||
url = WebUtils.encodeUrlFileName(url);
|
url = WebUtils.encodeUrlFileName(url);
|
||||||
fileName = KkFileUtils.htmlEscape(fileName); //文件名处理
|
fileName = KkFileUtils.htmlEscape(fileName); //文件名处理
|
||||||
attribute.setType(type);
|
attribute.setType(type);
|
||||||
attribute.setName(fileName);
|
attribute.setName(fileName);
|
||||||
attribute.setSuffix(suffix);
|
attribute.setSuffix(suffix);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public interface FilePreview {
|
|||||||
String EXEL_FILE_PREVIEW_PAGE = "html";
|
String EXEL_FILE_PREVIEW_PAGE = "html";
|
||||||
String XML_FILE_PREVIEW_PAGE = "xml";
|
String XML_FILE_PREVIEW_PAGE = "xml";
|
||||||
String MARKDOWN_FILE_PREVIEW_PAGE = "markdown";
|
String MARKDOWN_FILE_PREVIEW_PAGE = "markdown";
|
||||||
|
String BPMN_FILE_PREVIEW_PAGE = "bpmn";
|
||||||
String NOT_SUPPORTED_FILE_PAGE = "fileNotSupported";
|
String NOT_SUPPORTED_FILE_PAGE = "fileNotSupported";
|
||||||
|
|
||||||
String filePreviewHandle(String url, Model model, FileAttribute fileAttribute);
|
String filePreviewHandle(String url, Model model, FileAttribute fileAttribute);
|
||||||
|
|||||||
20
server/src/main/java/cn/keking/service/ZtreeNodeVo.java
Normal file
20
server/src/main/java/cn/keking/service/ZtreeNodeVo.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package cn.keking.service;
|
||||||
|
import java.util.List;
|
||||||
|
public class ZtreeNodeVo {
|
||||||
|
public String id;
|
||||||
|
public String pid;
|
||||||
|
public String name;
|
||||||
|
public List<ZtreeNodeVo> children;
|
||||||
|
public void setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
public void setPid(String pid) {
|
||||||
|
this.pid = pid;
|
||||||
|
}
|
||||||
|
public void setChildren(List<ZtreeNodeVo> children) {
|
||||||
|
this.children = children;
|
||||||
|
}
|
||||||
|
}
|
||||||
20
server/src/main/java/cn/keking/service/cache/NotResourceCache.java
vendored
Normal file
20
server/src/main/java/cn/keking/service/cache/NotResourceCache.java
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package cn.keking.service.cache;
|
||||||
|
|
||||||
|
import org.apache.pdfbox.cos.COSObject;
|
||||||
|
import org.apache.pdfbox.pdmodel.DefaultResourceCache;
|
||||||
|
import org.apache.pdfbox.pdmodel.graphics.PDXObject;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: Sawyer.Yong
|
||||||
|
* @since: 2023/02/18 14:45
|
||||||
|
* 解决图片 SoftReference 导致内存无法被回收导致的OOM, 详见 https://issues.apache.org/jira/browse/PDFBOX-3700
|
||||||
|
*/
|
||||||
|
public class NotResourceCache extends DefaultResourceCache {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void put(COSObject indirect, PDXObject xobject) throws IOException {
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
package cn.keking.service.impl;
|
||||||
|
|
||||||
|
import cn.keking.model.FileAttribute;
|
||||||
|
import cn.keking.service.FilePreview;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author kl (http://kailing.pub)
|
||||||
|
* @since 2023/3/9
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BpmnFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
|
public BpmnFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
|
this.commonPreview = commonPreview;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
|
model.addAttribute("fileName", fileAttribute.getName());
|
||||||
|
return FilePreview.BPMN_FILE_PREVIEW_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package cn.keking.service.impl;
|
||||||
|
|
||||||
|
import cn.keking.model.FileAttribute;
|
||||||
|
import cn.keking.model.ReturnResponse;
|
||||||
|
import cn.keking.service.FileHandlerService;
|
||||||
|
import cn.keking.service.FilePreview;
|
||||||
|
import cn.keking.utils.DownloadUtils;
|
||||||
|
import cn.keking.utils.KkFileUtils;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by kl on 2018/1/17.
|
||||||
|
* Content :图片文件处理
|
||||||
|
*/
|
||||||
|
@Component("commonPreview")
|
||||||
|
public class CommonPreviewImpl implements FilePreview {
|
||||||
|
|
||||||
|
private final FileHandlerService fileHandlerService;
|
||||||
|
private final OtherFilePreviewImpl otherFilePreview;
|
||||||
|
|
||||||
|
public CommonPreviewImpl(FileHandlerService fileHandlerService, OtherFilePreviewImpl otherFilePreview) {
|
||||||
|
this.fileHandlerService = fileHandlerService;
|
||||||
|
this.otherFilePreview = otherFilePreview;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
|
// 不是http开头,浏览器不能直接访问,需下载到本地
|
||||||
|
if (url != null && !url.toLowerCase().startsWith("http")) {
|
||||||
|
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, null);
|
||||||
|
if (response.isFailure()) {
|
||||||
|
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||||
|
} else {
|
||||||
|
String file = fileHandlerService.getRelativePath(response.getContent());
|
||||||
|
model.addAttribute("currentUrl", file);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
model.addAttribute("currentUrl", url);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,10 +7,15 @@ import cn.keking.service.FilePreview;
|
|||||||
import cn.keking.utils.DownloadUtils;
|
import cn.keking.utils.DownloadUtils;
|
||||||
import cn.keking.service.FileHandlerService;
|
import cn.keking.service.FileHandlerService;
|
||||||
import cn.keking.service.CompressFileReader;
|
import cn.keking.service.CompressFileReader;
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
import org.apache.poi.EncryptedDocumentException;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by kl on 2018/1/17.
|
* Created by kl on 2018/1/17.
|
||||||
* Content :处理压缩包文件
|
* Content :处理压缩包文件
|
||||||
@@ -21,7 +26,7 @@ public class CompressFilePreviewImpl implements FilePreview {
|
|||||||
private final FileHandlerService fileHandlerService;
|
private final FileHandlerService fileHandlerService;
|
||||||
private final CompressFileReader compressFileReader;
|
private final CompressFileReader compressFileReader;
|
||||||
private final OtherFilePreviewImpl otherFilePreview;
|
private final OtherFilePreviewImpl otherFilePreview;
|
||||||
|
private static final String Rar_PASSWORD_MSG = "password";
|
||||||
public CompressFilePreviewImpl(FileHandlerService fileHandlerService, CompressFileReader compressFileReader, OtherFilePreviewImpl otherFilePreview) {
|
public CompressFilePreviewImpl(FileHandlerService fileHandlerService, CompressFileReader compressFileReader, OtherFilePreviewImpl otherFilePreview) {
|
||||||
this.fileHandlerService = fileHandlerService;
|
this.fileHandlerService = fileHandlerService;
|
||||||
this.compressFileReader = compressFileReader;
|
this.compressFileReader = compressFileReader;
|
||||||
@@ -31,7 +36,8 @@ public class CompressFilePreviewImpl implements FilePreview {
|
|||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
String fileName=fileAttribute.getName();
|
String fileName=fileAttribute.getName();
|
||||||
String fileTree;
|
String filePassword = fileAttribute.getFilePassword();
|
||||||
|
String fileTree = null;
|
||||||
// 判断文件名是否存在(redis缓存读取)
|
// 判断文件名是否存在(redis缓存读取)
|
||||||
if (!StringUtils.hasText(fileHandlerService.getConvertedFile(fileName)) || !ConfigConstants.isCacheEnabled()) {
|
if (!StringUtils.hasText(fileHandlerService.getConvertedFile(fileName)) || !ConfigConstants.isCacheEnabled()) {
|
||||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||||
@@ -39,21 +45,32 @@ public class CompressFilePreviewImpl implements FilePreview {
|
|||||||
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||||
}
|
}
|
||||||
String filePath = response.getContent();
|
String filePath = response.getContent();
|
||||||
fileTree = compressFileReader.unRar(filePath, fileName);
|
try {
|
||||||
if (fileTree != null && !"null".equals(fileTree)) {
|
fileTree = compressFileReader.unRar(filePath, filePassword,fileName);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Throwable[] throwableArray = ExceptionUtils.getThrowables(e);
|
||||||
|
for (Throwable throwable : throwableArray) {
|
||||||
|
if (throwable instanceof IOException || throwable instanceof EncryptedDocumentException) {
|
||||||
|
if (e.getMessage().toLowerCase().contains(Rar_PASSWORD_MSG)) {
|
||||||
|
model.addAttribute("needFilePassword", true);
|
||||||
|
return EXEL_FILE_PREVIEW_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!ObjectUtils.isEmpty(fileTree)) {
|
||||||
if (ConfigConstants.isCacheEnabled()) {
|
if (ConfigConstants.isCacheEnabled()) {
|
||||||
// 加入缓存
|
// 加入缓存
|
||||||
fileHandlerService.addConvertedFile(fileName, fileTree);
|
fileHandlerService.addConvertedFile(fileName, fileTree);
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
return otherFilePreview.notSupportedFile(model, fileAttribute, "压缩文件密码错误! 压缩文件损坏! 压缩文件类型不受支持!");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fileTree = fileHandlerService.getConvertedFile(fileName);
|
fileTree = fileHandlerService.getConvertedFile(fileName);
|
||||||
}
|
}
|
||||||
if (fileTree != null && !"null".equals(fileTree)) {
|
model.addAttribute("fileName", fileName);
|
||||||
model.addAttribute("fileTree", fileTree);
|
model.addAttribute("fileTree", fileTree);
|
||||||
return COMPRESS_FILE_PREVIEW_PAGE;
|
return COMPRESS_FILE_PREVIEW_PAGE;
|
||||||
} else {
|
|
||||||
return otherFilePreview.notSupportedFile(model, fileAttribute, "压缩文件类型不受支持");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class EmlFilePreviewImpl implements FilePreview {
|
public class EmlFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public EmlFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public EmlFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return EML_FILE_PREVIEW_PAGE;
|
return EML_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class EpubFilePreviewImpl implements FilePreview {
|
public class EpubFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public EpubFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public EpubFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return EpubFilePreviewImpl;
|
return EpubFilePreviewImpl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class OfdFilePreviewImpl implements FilePreview {
|
public class OfdFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public OfdFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public OfdFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return OFD_FILE_PREVIEW_PAGE;
|
return OFD_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class OfficeFilePreviewImpl implements FilePreview {
|
|||||||
String fileName = fileAttribute.getName();
|
String fileName = fileAttribute.getName();
|
||||||
String filePassword = fileAttribute.getFilePassword();
|
String filePassword = fileAttribute.getFilePassword();
|
||||||
String userToken = fileAttribute.getUserToken();
|
String userToken = fileAttribute.getUserToken();
|
||||||
boolean isHtml = suffix.equalsIgnoreCase("xls") || suffix.equalsIgnoreCase("xlsx") || suffix.equalsIgnoreCase("csv");
|
boolean isHtml = suffix.equalsIgnoreCase("xls") || suffix.equalsIgnoreCase("xlsx") || suffix.equalsIgnoreCase("csv") || suffix.equalsIgnoreCase("xlsm") || suffix.equalsIgnoreCase("xlt") || suffix.equalsIgnoreCase("xltm") || suffix.equalsIgnoreCase("et") || suffix.equalsIgnoreCase("ett") || suffix.equalsIgnoreCase("xlam");
|
||||||
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + (isHtml ? "html" : "pdf");
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + (isHtml ? "html" : "pdf");
|
||||||
String cacheFileName = userToken == null ? pdfName : userToken + "_" + pdfName;
|
String cacheFileName = userToken == null ? pdfName : userToken + "_" + pdfName;
|
||||||
String outFilePath = FILE_DIR + cacheFileName;
|
String outFilePath = FILE_DIR + cacheFileName;
|
||||||
|
|||||||
@@ -12,15 +12,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class Online3DFilePreviewImpl implements FilePreview {
|
public class Online3DFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public Online3DFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public Online3DFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return Online3D_FILE_PAGE;
|
return Online3D_FILE_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,12 +18,13 @@ import java.util.List;
|
|||||||
* Content :图片文件处理
|
* Content :图片文件处理
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class PictureFilePreviewImpl implements FilePreview {
|
public class PictureFilePreviewImpl extends CommonPreviewImpl {
|
||||||
|
|
||||||
private final FileHandlerService fileHandlerService;
|
private final FileHandlerService fileHandlerService;
|
||||||
private final OtherFilePreviewImpl otherFilePreview;
|
private final OtherFilePreviewImpl otherFilePreview;
|
||||||
|
|
||||||
public PictureFilePreviewImpl(FileHandlerService fileHandlerService, OtherFilePreviewImpl otherFilePreview) {
|
public PictureFilePreviewImpl(FileHandlerService fileHandlerService, OtherFilePreviewImpl otherFilePreview) {
|
||||||
|
super(fileHandlerService, otherFilePreview);
|
||||||
this.fileHandlerService = fileHandlerService;
|
this.fileHandlerService = fileHandlerService;
|
||||||
this.otherFilePreview = otherFilePreview;
|
this.otherFilePreview = otherFilePreview;
|
||||||
}
|
}
|
||||||
@@ -39,21 +40,8 @@ public class PictureFilePreviewImpl implements FilePreview {
|
|||||||
imgUrls.addAll(zipImgUrls);
|
imgUrls.addAll(zipImgUrls);
|
||||||
}
|
}
|
||||||
// 不是http开头,浏览器不能直接访问,需下载到本地
|
// 不是http开头,浏览器不能直接访问,需下载到本地
|
||||||
if (url != null && !url.toLowerCase().startsWith("http")) {
|
super.filePreviewHandle(url, model, fileAttribute);
|
||||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, null);
|
model.addAttribute("imgUrls", imgUrls);
|
||||||
if (response.isFailure()) {
|
|
||||||
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
|
||||||
} else {
|
|
||||||
String file = fileHandlerService.getRelativePath(response.getContent());
|
|
||||||
imgUrls.clear();
|
|
||||||
imgUrls.add(file);
|
|
||||||
model.addAttribute("imgUrls", imgUrls);
|
|
||||||
model.addAttribute("currentUrl", file);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
model.addAttribute("imgUrls", imgUrls);
|
|
||||||
model.addAttribute("currentUrl", url);
|
|
||||||
}
|
|
||||||
return PICTURE_FILE_PREVIEW_PAGE;
|
return PICTURE_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class SvgFilePreviewImpl implements FilePreview {
|
public class SvgFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public SvgFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public SvgFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return SVG_FILE_PREVIEW_PAGE;
|
return SVG_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,13 +3,11 @@ package cn.keking.service.impl;
|
|||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
|
import cn.keking.service.FileHandlerService;
|
||||||
import cn.keking.service.FilePreview;
|
import cn.keking.service.FilePreview;
|
||||||
import cn.keking.utils.ConvertPicUtil;
|
import cn.keking.utils.ConvertPicUtil;
|
||||||
import cn.keking.utils.DownloadUtils;
|
import cn.keking.utils.DownloadUtils;
|
||||||
import cn.keking.utils.WebUtils;
|
|
||||||
import cn.keking.web.filter.BaseUrlFilter;
|
import cn.keking.web.filter.BaseUrlFilter;
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.ui.Model;
|
import org.springframework.ui.Model;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
@@ -27,72 +25,64 @@ import java.util.List;
|
|||||||
@Service
|
@Service
|
||||||
public class TiffFilePreviewImpl implements FilePreview {
|
public class TiffFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(TiffFilePreviewImpl.class);
|
private final FileHandlerService fileHandlerService;
|
||||||
|
private final OtherFilePreviewImpl otherFilePreview;
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
public TiffFilePreviewImpl(FileHandlerService fileHandlerService,OtherFilePreviewImpl otherFilePreview) {
|
||||||
private static final String INITIALIZE_MEMORY_SIZE = "initializeMemorySize";
|
this.fileHandlerService = fileHandlerService;
|
||||||
//默认初始化 50MB 内存
|
this.otherFilePreview = otherFilePreview;
|
||||||
private static final long INITIALIZE_MEMORY_SIZE_VALUE_DEFAULT = 1024L * 1024 * 50;
|
|
||||||
|
|
||||||
private final String fileDir = ConfigConstants.getFileDir();
|
|
||||||
|
|
||||||
public TiffFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
|
||||||
}
|
}
|
||||||
|
private final String fileDir = ConfigConstants.getFileDir();
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
|
String fileName = fileAttribute.getName();
|
||||||
|
String baseUrl = BaseUrlFilter.getBaseUrl();
|
||||||
String tifPreviewType = ConfigConstants.getTifPreviewType();
|
String tifPreviewType = ConfigConstants.getTifPreviewType();
|
||||||
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
|
String tifOnLinePreviewType = fileAttribute.getTifPreviewType();
|
||||||
if (StringUtils.hasText(tifOnLinePreviewType)) {
|
if (StringUtils.hasText(tifOnLinePreviewType)) {
|
||||||
tifPreviewType = tifOnLinePreviewType;
|
tifPreviewType = tifOnLinePreviewType;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("tif".equalsIgnoreCase(tifPreviewType)) {
|
if ("tif".equalsIgnoreCase(tifPreviewType)) {
|
||||||
|
model.addAttribute("currentUrl", url);
|
||||||
pictureFilePreview.filePreviewHandle(url, model, fileAttribute);
|
|
||||||
String fileSize = WebUtils.getUrlParameterReg(url, INITIALIZE_MEMORY_SIZE);
|
|
||||||
if (StringUtils.hasText(fileSize)) {
|
|
||||||
model.addAttribute(INITIALIZE_MEMORY_SIZE, fileSize);
|
|
||||||
} else {
|
|
||||||
model.addAttribute(INITIALIZE_MEMORY_SIZE, Long.toString(INITIALIZE_MEMORY_SIZE_VALUE_DEFAULT));
|
|
||||||
}
|
|
||||||
return TIFF_FILE_PREVIEW_PAGE;
|
return TIFF_FILE_PREVIEW_PAGE;
|
||||||
|
|
||||||
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
|
} else if ("jpg".equalsIgnoreCase(tifPreviewType) || "pdf".equalsIgnoreCase(tifPreviewType)) {
|
||||||
String inputFileName = url.substring(url.lastIndexOf("/") + 1);
|
String pdfName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "pdf";
|
||||||
String inputFileNamePrefix = inputFileName.substring(0, inputFileName.lastIndexOf("."));
|
String jpgName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + "jpg";
|
||||||
|
String strLocalTif = fileDir + fileName;
|
||||||
String strLocalTif = fileDir + inputFileName;
|
String outFilePath = fileDir + pdfName;
|
||||||
File fileTiff = new File(strLocalTif);
|
|
||||||
// 如果本地不存在这个tif文件,则下载
|
|
||||||
if (!fileTiff.exists()) {
|
|
||||||
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, inputFileName);
|
|
||||||
if (response.isFailure()) {
|
|
||||||
return NOT_SUPPORTED_FILE_PAGE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
String baseUrl = BaseUrlFilter.getBaseUrl();
|
|
||||||
if ("pdf".equalsIgnoreCase(tifPreviewType)) {
|
if ("pdf".equalsIgnoreCase(tifPreviewType)) {
|
||||||
// 以PDF模式预览的过程
|
//当文件不存在时,就去下载
|
||||||
File filePdf = new File(fileDir + inputFileNamePrefix + ".pdf");
|
if (!fileHandlerService.listConvertedFiles().containsKey(pdfName) || !ConfigConstants.isCacheEnabled()) {
|
||||||
// 如果本地不存在对应的pdf,则调用转换过程。否则直接用现有的pdf文件
|
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||||
if (!filePdf.exists()) {
|
if (response.isFailure()) {
|
||||||
filePdf = ConvertPicUtil.convertTif2Pdf(strLocalTif, fileDir + inputFileNamePrefix + ".pdf");
|
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||||
}
|
}
|
||||||
|
String filePath = response.getContent();
|
||||||
// 如果pdf已经存在,则将url路径加入到对象中,返回给页面
|
if (ConfigConstants.isCacheEnabled()) {
|
||||||
assert filePdf != null;
|
// 加入缓存
|
||||||
if (filePdf.exists()) {
|
fileHandlerService.addConvertedFile(pdfName, fileHandlerService.getRelativePath(outFilePath));
|
||||||
String pdfUrl = baseUrl + inputFileNamePrefix + ".pdf";
|
}
|
||||||
model.addAttribute("pdfUrl", pdfUrl);
|
if(ConvertPicUtil.convertJpg2Pdf(filePath, outFilePath)){
|
||||||
|
model.addAttribute("pdfUrl", pdfName);
|
||||||
|
return PDF_FILE_PREVIEW_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
model.addAttribute("pdfUrl", pdfName);
|
||||||
return PDF_FILE_PREVIEW_PAGE;
|
return PDF_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
File fileTiff = new File(strLocalTif);
|
||||||
|
// 如果本地不存在这个tif文件,则下载
|
||||||
|
if (!fileTiff.exists()) {
|
||||||
|
ReturnResponse<String> response = DownloadUtils.downLoad(fileAttribute, fileName);
|
||||||
|
if (response.isFailure()) {
|
||||||
|
return otherFilePreview.notSupportedFile(model, fileAttribute, response.getMsg());
|
||||||
|
}
|
||||||
|
strLocalTif = response.getContent();
|
||||||
|
}
|
||||||
// 以JPG模式预览的过程
|
// 以JPG模式预览的过程
|
||||||
String strJpgFilePathName = fileDir + inputFileNamePrefix + ".jpg";
|
String strJpgFilePathName = fileDir + jpgName;
|
||||||
// 将tif转换为jpg,返回转换后的文件路径、文件名的list
|
// 将tif转换为jpg,返回转换后的文件路径、文件名的list
|
||||||
List<String> listPic2Jpg = ConvertPicUtil.convertTif2Jpg(strLocalTif, strJpgFilePathName);
|
List<String> listPic2Jpg = ConvertPicUtil.convertTif2Jpg(strLocalTif, strJpgFilePathName);
|
||||||
// 将返回页面的图片url的list对象
|
// 将返回页面的图片url的list对象
|
||||||
@@ -101,19 +91,11 @@ public class TiffFilePreviewImpl implements FilePreview {
|
|||||||
for (String strJpg : listPic2Jpg) {
|
for (String strJpg : listPic2Jpg) {
|
||||||
listImageUrls.add(baseUrl + strJpg);
|
listImageUrls.add(baseUrl + strJpg);
|
||||||
}
|
}
|
||||||
|
|
||||||
model.addAttribute("imgUrls", listImageUrls);
|
model.addAttribute("imgUrls", listImageUrls);
|
||||||
model.addAttribute("currentUrl", listImageUrls.get(0));
|
model.addAttribute("currentUrl", listImageUrls.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 转换后的tif没用了,可以删掉了
|
|
||||||
if (fileTiff.exists() && !fileTiff.delete()) {
|
|
||||||
logger.error("{} 清理失败", strLocalTif);
|
|
||||||
}
|
|
||||||
|
|
||||||
return PICTURE_FILE_PREVIEW_PAGE;
|
return PICTURE_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NOT_SUPPORTED_FILE_PAGE;
|
return NOT_SUPPORTED_FILE_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ import org.springframework.ui.Model;
|
|||||||
@Service
|
@Service
|
||||||
public class XmindFilePreviewImpl implements FilePreview {
|
public class XmindFilePreviewImpl implements FilePreview {
|
||||||
|
|
||||||
private final PictureFilePreviewImpl pictureFilePreview;
|
private final CommonPreviewImpl commonPreview;
|
||||||
|
|
||||||
public XmindFilePreviewImpl(PictureFilePreviewImpl pictureFilePreview) {
|
public XmindFilePreviewImpl(CommonPreviewImpl commonPreview) {
|
||||||
this.pictureFilePreview = pictureFilePreview;
|
this.commonPreview = commonPreview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
public String filePreviewHandle(String url, Model model, FileAttribute fileAttribute) {
|
||||||
pictureFilePreview.filePreviewHandle(url,model,fileAttribute);
|
commonPreview.filePreviewHandle(url,model,fileAttribute);
|
||||||
return XMIND_FILE_PREVIEW_PAGE;
|
return XMIND_FILE_PREVIEW_PAGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
package cn.keking.utils;
|
package cn.keking.utils;
|
||||||
|
|
||||||
|
|
||||||
import com.lowagie.text.Document;
|
import cn.keking.config.ConfigConstants;
|
||||||
import com.lowagie.text.Image;
|
|
||||||
import com.lowagie.text.Rectangle;
|
|
||||||
import com.lowagie.text.pdf.PdfWriter;
|
|
||||||
import com.lowagie.text.pdf.RandomAccessFileOrArray;
|
|
||||||
import com.lowagie.text.pdf.codec.TiffImage;
|
|
||||||
import com.sun.media.jai.codec.*;
|
import com.sun.media.jai.codec.*;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import com.itextpdf.text.Document;
|
||||||
|
import com.itextpdf.text.Image;
|
||||||
|
import com.itextpdf.text.io.FileChannelRandomAccessSource;
|
||||||
|
import com.itextpdf.text.pdf.PdfWriter;
|
||||||
|
import com.itextpdf.text.pdf.RandomAccessFileOrArray;
|
||||||
|
import com.itextpdf.text.pdf.codec.TiffImage;
|
||||||
import javax.media.jai.JAI;
|
import javax.media.jai.JAI;
|
||||||
import javax.media.jai.RenderedOp;
|
import javax.media.jai.RenderedOp;
|
||||||
import java.awt.image.RenderedImage;
|
import java.awt.image.RenderedImage;
|
||||||
@@ -18,13 +19,14 @@ import java.awt.image.renderable.ParameterBlock;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.RandomAccessFile;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class ConvertPicUtil {
|
public class ConvertPicUtil {
|
||||||
|
|
||||||
private final static Logger logger = LoggerFactory.getLogger(ConvertPicUtil.class);
|
private final static Logger logger = LoggerFactory.getLogger(ConvertPicUtil.class);
|
||||||
|
private final static String fileDir = ConfigConstants.getFileDir();
|
||||||
/**
|
/**
|
||||||
* Tif 转 JPG。
|
* Tif 转 JPG。
|
||||||
*
|
*
|
||||||
@@ -42,25 +44,21 @@ public class ConvertPicUtil {
|
|||||||
logger.info("找不到文件【" + strInputFile + "】");
|
logger.info("找不到文件【" + strInputFile + "】");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
strInputFile = strInputFile.replaceAll("\\\\", "/");
|
strInputFile = strInputFile.replaceAll("\\\\", "/");
|
||||||
strOutputFile = strOutputFile.replaceAll("\\\\", "/");
|
strOutputFile = strOutputFile.replaceAll("\\\\", "/");
|
||||||
|
|
||||||
FileSeekableStream fileSeekStream = null;
|
FileSeekableStream fileSeekStream = null;
|
||||||
try {
|
try {
|
||||||
JPEGEncodeParam jpegEncodeParam = new JPEGEncodeParam();
|
JPEGEncodeParam jpegEncodeParam = new JPEGEncodeParam();
|
||||||
|
|
||||||
TIFFEncodeParam tiffEncodeParam = new TIFFEncodeParam();
|
TIFFEncodeParam tiffEncodeParam = new TIFFEncodeParam();
|
||||||
tiffEncodeParam.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
|
tiffEncodeParam.setCompression(TIFFEncodeParam.COMPRESSION_GROUP4);
|
||||||
tiffEncodeParam.setLittleEndian(false);
|
tiffEncodeParam.setLittleEndian(false);
|
||||||
|
String jpgname = strInputFile.replace(fileDir.replace("\\","/"), "");
|
||||||
String strFilePrefix = strInputFile.substring(strInputFile.lastIndexOf("/") + 1, strInputFile.lastIndexOf("."));
|
int index = jpgname.lastIndexOf(".");
|
||||||
|
String strFilePrefix = jpgname.substring(0, index);
|
||||||
fileSeekStream = new FileSeekableStream(strInputFile);
|
fileSeekStream = new FileSeekableStream(strInputFile);
|
||||||
ImageDecoder imageDecoder = ImageCodec.createImageDecoder("TIFF", fileSeekStream, null);
|
ImageDecoder imageDecoder = ImageCodec.createImageDecoder("TIFF", fileSeekStream, null);
|
||||||
int intTifCount = imageDecoder.getNumPages();
|
int intTifCount = imageDecoder.getNumPages();
|
||||||
logger.info("该tif文件共有【" + intTifCount + "】页");
|
logger.info("该tif文件共有【" + intTifCount + "】页");
|
||||||
|
|
||||||
String strJpgPath;
|
String strJpgPath;
|
||||||
String strJpgUrl;
|
String strJpgUrl;
|
||||||
if (intTifCount == 1) {
|
if (intTifCount == 1) {
|
||||||
@@ -87,9 +85,7 @@ public class ConvertPicUtil {
|
|||||||
strJpg = strJpgPath + "/" + i + ".jpg";
|
strJpg = strJpgPath + "/" + i + ".jpg";
|
||||||
strJpgUrl = strFilePrefix + "/" + i + ".jpg";
|
strJpgUrl = strFilePrefix + "/" + i + ".jpg";
|
||||||
}
|
}
|
||||||
|
|
||||||
File fileJpg = new File(strJpg);
|
File fileJpg = new File(strJpg);
|
||||||
|
|
||||||
// 如果文件不存在,则生成
|
// 如果文件不存在,则生成
|
||||||
if (!fileJpg.exists()) {
|
if (!fileJpg.exists()) {
|
||||||
RenderedImage renderedImage = imageDecoder.decodeAsRenderedImage(i);
|
RenderedImage renderedImage = imageDecoder.decodeAsRenderedImage(i);
|
||||||
@@ -98,13 +94,11 @@ public class ConvertPicUtil {
|
|||||||
pb.add(fileJpg.toString());
|
pb.add(fileJpg.toString());
|
||||||
pb.add("JPEG");
|
pb.add("JPEG");
|
||||||
pb.add(jpegEncodeParam);
|
pb.add(jpegEncodeParam);
|
||||||
|
|
||||||
RenderedOp renderedOp = JAI.create("filestore", pb);
|
RenderedOp renderedOp = JAI.create("filestore", pb);
|
||||||
renderedOp.dispose();
|
renderedOp.dispose();
|
||||||
|
|
||||||
logger.info("每页分别保存至: " + fileJpg.getCanonicalPath());
|
logger.info("每页分别保存至: " + fileJpg.getCanonicalPath());
|
||||||
} else {
|
} else {
|
||||||
logger.info("JPG文件已存在: " + fileJpg.getCanonicalPath());
|
// logger.info("JPG文件已存在: " + fileJpg.getCanonicalPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
listImageFiles.add(strJpgUrl);
|
listImageFiles.add(strJpgUrl);
|
||||||
@@ -131,101 +125,45 @@ public class ConvertPicUtil {
|
|||||||
* @param strJpgFile 输入的jpg的路径和文件名
|
* @param strJpgFile 输入的jpg的路径和文件名
|
||||||
* @param strPdfFile 输出的pdf的路径和文件名
|
* @param strPdfFile 输出的pdf的路径和文件名
|
||||||
*/
|
*/
|
||||||
public static void convertJpg2Pdf(String strJpgFile, String strPdfFile) {
|
private static final int FIT_WIDTH = 500;
|
||||||
Document document = new Document();
|
private static final int FIT_HEIGHT = 900;
|
||||||
// 设置文档页边距
|
public static boolean convertJpg2Pdf(String strJpgFile, String strPdfFile) {
|
||||||
document.setMargins(0, 0, 0, 0);
|
Document document= null;
|
||||||
|
RandomAccessFileOrArray rafa = null;
|
||||||
FileOutputStream fos = null;
|
|
||||||
try {
|
try {
|
||||||
fos = new FileOutputStream(strPdfFile);
|
document = new Document();
|
||||||
PdfWriter.getInstance(document, fos);
|
PdfWriter.getInstance(document, new FileOutputStream(strPdfFile));
|
||||||
// 打开文档
|
|
||||||
document.open();
|
document.open();
|
||||||
// 获取图片的宽高
|
rafa = new RandomAccessFileOrArray(new FileChannelRandomAccessSource(new RandomAccessFile(strJpgFile, "r").getChannel()));
|
||||||
Image image = Image.getInstance(strJpgFile);
|
int pages = TiffImage.getNumberOfPages(rafa);
|
||||||
float floatImageHeight = image.getScaledHeight();
|
Image image;
|
||||||
float floatImageWidth = image.getScaledWidth();
|
for (int i = 1; i <= pages; i++) {
|
||||||
// 设置页面宽高与图片一致
|
try {
|
||||||
Rectangle rectangle = new Rectangle(floatImageWidth, floatImageHeight);
|
image = TiffImage.getTiffImage(rafa, i);
|
||||||
document.setPageSize(rectangle);
|
image.scaleToFit(FIT_WIDTH, FIT_HEIGHT);
|
||||||
// 图片居中
|
document.add(image);
|
||||||
image.setAlignment(Image.ALIGN_CENTER);
|
} catch (Exception e) {
|
||||||
//新建一页添加图片
|
document.close();
|
||||||
document.newPage();
|
rafa.close();
|
||||||
document.add(image);
|
e.printStackTrace();
|
||||||
} catch (Exception ioe) {
|
}
|
||||||
ioe.printStackTrace();
|
}
|
||||||
} finally {
|
document.close();
|
||||||
//关闭文档
|
rafa.close();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
System.out.println("错误:"+ e.getMessage());
|
||||||
|
}
|
||||||
|
finally {
|
||||||
document.close();
|
document.close();
|
||||||
try {
|
try {
|
||||||
assert fos != null;
|
rafa.close();
|
||||||
fos.flush();
|
|
||||||
fos.close();
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 将Tif图片转换为Pdf文件(支持多页Tif)
|
|
||||||
*
|
|
||||||
* @param strTifFile 输入的tif的路径和文件名
|
|
||||||
* @param strPdfFile 输出的pdf的路径和文件名
|
|
||||||
* @return File
|
|
||||||
*/
|
|
||||||
public static File convertTif2Pdf(String strTifFile, String strPdfFile) {
|
|
||||||
try {
|
|
||||||
RandomAccessFileOrArray rafa = new RandomAccessFileOrArray(strTifFile);
|
|
||||||
|
|
||||||
Document document = new Document();
|
|
||||||
// 设置文档页边距
|
|
||||||
document.setMargins(0, 0, 0, 0);
|
|
||||||
|
|
||||||
PdfWriter.getInstance(document, new FileOutputStream(strPdfFile));
|
|
||||||
document.open();
|
|
||||||
int intPages = TiffImage.getNumberOfPages(rafa);
|
|
||||||
Image image;
|
|
||||||
File filePDF;
|
|
||||||
|
|
||||||
if (intPages == 1) {
|
|
||||||
String strJpg = strTifFile.substring(0, strTifFile.lastIndexOf(".")) + ".jpg";
|
|
||||||
File fileJpg = new File(strJpg);
|
|
||||||
List<String> listPic2Jpg = convertTif2Jpg(strTifFile, strJpg);
|
|
||||||
|
|
||||||
if (listPic2Jpg != null && fileJpg.exists()) {
|
|
||||||
convertJpg2Pdf(strJpg, strPdfFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
for (int i = 1; i <= intPages; i++) {
|
|
||||||
image = TiffImage.getTiffImage(rafa, i);
|
|
||||||
// 设置页面宽高与图片一致
|
|
||||||
Rectangle pageSize = new Rectangle(image.getScaledWidth(), image.getScaledHeight());
|
|
||||||
document.setPageSize(pageSize);
|
|
||||||
// 图片居中
|
|
||||||
image.setAlignment(Image.ALIGN_CENTER);
|
|
||||||
//新建一页添加图片
|
|
||||||
document.newPage();
|
|
||||||
document.add(image);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
rafa.close();
|
|
||||||
|
|
||||||
filePDF = new File(strPdfFile);
|
|
||||||
|
|
||||||
return filePDF;
|
|
||||||
} catch (Exception e) {
|
|
||||||
logger.error(e.getMessage(), e);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -3,16 +3,17 @@ package cn.keking.utils;
|
|||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.FileAttribute;
|
import cn.keking.model.FileAttribute;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
import cn.keking.service.FileHandlerService;
|
|
||||||
import io.mola.galimatias.GalimatiasParseException;
|
import io.mola.galimatias.GalimatiasParseException;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
import java.net.*;
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLDecoder;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import static cn.keking.utils.KkFileUtils.isFtpUrl;
|
import static cn.keking.utils.KkFileUtils.isFtpUrl;
|
||||||
@@ -36,14 +37,31 @@ public class DownloadUtils {
|
|||||||
*/
|
*/
|
||||||
public static ReturnResponse<String> downLoad(FileAttribute fileAttribute, String fileName) {
|
public static ReturnResponse<String> downLoad(FileAttribute fileAttribute, String fileName) {
|
||||||
// 忽略ssl证书
|
// 忽略ssl证书
|
||||||
|
String urlStr = null;
|
||||||
|
String urlStrr = null;
|
||||||
|
URL urll;
|
||||||
try {
|
try {
|
||||||
SslUtils.ignoreSsl();
|
SslUtils.ignoreSsl();
|
||||||
|
urlStr = fileAttribute.getUrl().replaceAll("\\+", "%20");
|
||||||
|
urll = new URL(urlStr);
|
||||||
|
urlStrr = URLDecoder.decode(urll.getPath(), "UTF-8");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("忽略SSL证书异常:", e);
|
logger.error("忽略SSL证书异常:", e);
|
||||||
}
|
}
|
||||||
String urlStr = fileAttribute.getUrl().replaceAll("\\+", "%20");
|
|
||||||
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
|
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
|
||||||
String realPath = DownloadUtils.getRelFilePath(fileName, fileAttribute);
|
String realPath = getRelFilePath(fileName, fileAttribute);
|
||||||
|
if (!KkFileUtils.isAllowedUpload(realPath)) {
|
||||||
|
response.setCode(1);
|
||||||
|
response.setContent(null);
|
||||||
|
response.setMsg("下载失败:不支持的类型!" + urlStr);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
assert urlStr != null;
|
||||||
|
if (urlStr.contains("?fileKey=")) {
|
||||||
|
response.setContent(fileDir + urlStrr);
|
||||||
|
response.setMsg(fileName);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
if(!StringUtils.hasText(realPath)){
|
if(!StringUtils.hasText(realPath)){
|
||||||
response.setCode(1);
|
response.setCode(1);
|
||||||
response.setContent(null);
|
response.setContent(null);
|
||||||
@@ -75,7 +93,7 @@ public class DownloadUtils {
|
|||||||
response.setMsg(fileName);
|
response.setMsg(fileName);
|
||||||
return response;
|
return response;
|
||||||
} catch (IOException | GalimatiasParseException e) {
|
} catch (IOException | GalimatiasParseException e) {
|
||||||
logger.error("文件下载失败,url:{}", urlStr, e);
|
logger.error("文件下载失败,url:{}", urlStr);
|
||||||
response.setCode(1);
|
response.setCode(1);
|
||||||
response.setContent(null);
|
response.setContent(null);
|
||||||
if (e instanceof FileNotFoundException) {
|
if (e instanceof FileNotFoundException) {
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package cn.keking.utils;
|
package cn.keking.utils;
|
||||||
|
|
||||||
|
import cn.keking.config.ConfigConstants;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
import org.springframework.web.util.HtmlUtils;
|
||||||
|
|
||||||
@@ -174,4 +176,19 @@ public class KkFileUtils {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断文件是否允许上传
|
||||||
|
*
|
||||||
|
* @param file 文件扩展名
|
||||||
|
* @return 是否允许上传
|
||||||
|
*/
|
||||||
|
public static boolean isAllowedUpload(String file) {
|
||||||
|
String fileType = suffixFromFileName(file);
|
||||||
|
for (String type : ConfigConstants.getprohibit()) {
|
||||||
|
if (type.equals(fileType))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return !ObjectUtils.isEmpty(fileType);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
130
server/src/main/java/cn/keking/utils/RarUtils.java
Normal file
130
server/src/main/java/cn/keking/utils/RarUtils.java
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
package cn.keking.utils;
|
||||||
|
import cn.keking.config.ConfigConstants;
|
||||||
|
import cn.keking.service.ZtreeNodeVo;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.nio.charset.Charset;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author : Gao
|
||||||
|
* create : 2023-04-08
|
||||||
|
**/
|
||||||
|
public class RarUtils {
|
||||||
|
private static final String fileDir = ConfigConstants.getFileDir();
|
||||||
|
|
||||||
|
public static byte[] getUTF8BytesFromGBKString(String gbkStr) {
|
||||||
|
int n = gbkStr.length();
|
||||||
|
byte[] utfBytes = new byte[3 * n];
|
||||||
|
int k = 0;
|
||||||
|
for (int i = 0; i < n; i++) {
|
||||||
|
int m = gbkStr.charAt(i);
|
||||||
|
if (m < 128 && m >= 0) {
|
||||||
|
utfBytes[k++] = (byte) m;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
utfBytes[k++] = (byte) (0xe0 | (m >> 12));
|
||||||
|
utfBytes[k++] = (byte) (0x80 | ((m >> 6) & 0x3f));
|
||||||
|
utfBytes[k++] = (byte) (0x80 | (m & 0x3f));
|
||||||
|
}
|
||||||
|
if (k < utfBytes.length) {
|
||||||
|
byte[] tmp = new byte[k];
|
||||||
|
System.arraycopy(utfBytes, 0, tmp, 0, k);
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
return utfBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getUtf8String(String str) {
|
||||||
|
if (str != null && str.length() > 0) {
|
||||||
|
String needEncodeCode = "ISO-8859-1";
|
||||||
|
String neeEncodeCode = "ISO-8859-2";
|
||||||
|
String gbkEncodeCode = "GBK";
|
||||||
|
try {
|
||||||
|
if (Charset.forName(needEncodeCode).newEncoder().canEncode(str)) {
|
||||||
|
str = new String(str.getBytes(needEncodeCode), StandardCharsets.UTF_8);
|
||||||
|
}
|
||||||
|
if (Charset.forName(neeEncodeCode).newEncoder().canEncode(str)) {
|
||||||
|
str = new String(str.getBytes(neeEncodeCode), StandardCharsets.UTF_8);
|
||||||
|
}
|
||||||
|
if (Charset.forName(gbkEncodeCode).newEncoder().canEncode(str)) {
|
||||||
|
str = new String(getUTF8BytesFromGBKString(str), StandardCharsets.UTF_8);
|
||||||
|
}
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 判断是否是中日韩文字
|
||||||
|
*/
|
||||||
|
private static boolean isChinese(char c) {
|
||||||
|
Character.UnicodeBlock ub = Character.UnicodeBlock.of(c);
|
||||||
|
return ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
|
||||||
|
|| ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS
|
||||||
|
|| ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A
|
||||||
|
|| ub == Character.UnicodeBlock.GENERAL_PUNCTUATION
|
||||||
|
|| ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION
|
||||||
|
|| ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS;
|
||||||
|
}
|
||||||
|
public static boolean judge(char c){
|
||||||
|
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z');
|
||||||
|
}
|
||||||
|
public static boolean isMessyCode(String strName) {
|
||||||
|
//去除字符串中的空格 制表符 换行 回车
|
||||||
|
Pattern p = Pattern.compile("\\s*|\t*|\r*|\n*");
|
||||||
|
Matcher m = p.matcher(strName);
|
||||||
|
String after = m.replaceAll("").replaceAll("\\+", "").replaceAll("#", "").replaceAll("&", "");
|
||||||
|
//去除字符串中的标点符号
|
||||||
|
String temp = after.replaceAll("\\p{P}", "");
|
||||||
|
//处理之后转换成字符数组
|
||||||
|
char[] ch = temp.trim().toCharArray();
|
||||||
|
for (char c : ch) {
|
||||||
|
//判断是否是数字或者英文字符
|
||||||
|
if (!judge(c)) {
|
||||||
|
//判断是否是中日韩文
|
||||||
|
if (!isChinese(c)) {
|
||||||
|
//如果不是数字或者英文字符也不是中日韩文则表示是乱码返回true
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//表示不是乱码 返回false
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 读取文件目录树
|
||||||
|
*/
|
||||||
|
public static List<ZtreeNodeVo> getTree(String rootPath) {
|
||||||
|
List<ZtreeNodeVo> nodes = new ArrayList<>();
|
||||||
|
File file = new File(fileDir+rootPath);
|
||||||
|
ZtreeNodeVo node = traverse(file);
|
||||||
|
nodes.add(node);
|
||||||
|
return nodes;
|
||||||
|
}
|
||||||
|
private static ZtreeNodeVo traverse(File file) {
|
||||||
|
ZtreeNodeVo pathNodeVo = new ZtreeNodeVo();
|
||||||
|
pathNodeVo.setId(file.getAbsolutePath().replace(fileDir, "").replace("\\", "/"));
|
||||||
|
pathNodeVo.setName(file.getName());
|
||||||
|
pathNodeVo.setPid(file.getParent().replace(fileDir, "").replace("\\", "/"));
|
||||||
|
if (file.isDirectory()) {
|
||||||
|
List<ZtreeNodeVo> subNodeVos = new ArrayList<>();
|
||||||
|
File[] subFiles = file.listFiles();
|
||||||
|
if (subFiles == null) {
|
||||||
|
return pathNodeVo;
|
||||||
|
}
|
||||||
|
for (File subFile : subFiles) {
|
||||||
|
ZtreeNodeVo subNodeVo = traverse(subFile);
|
||||||
|
subNodeVos.add(subNodeVo);
|
||||||
|
}
|
||||||
|
pathNodeVo.setChildren(subNodeVos);
|
||||||
|
}
|
||||||
|
return pathNodeVo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ package cn.keking.utils;
|
|||||||
import io.mola.galimatias.GalimatiasParseException;
|
import io.mola.galimatias.GalimatiasParseException;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.util.Base64Utils;
|
import org.springframework.util.Base64Utils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.util.HtmlUtils;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@@ -103,6 +105,30 @@ public class WebUtils {
|
|||||||
return noQueryUrl.substring(noQueryUrl.lastIndexOf("/") + 1);
|
return noQueryUrl.substring(noQueryUrl.lastIndexOf("/") + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从url中剥离出文件名
|
||||||
|
* @param file 文件
|
||||||
|
* @return 文件名
|
||||||
|
*/
|
||||||
|
public static String getFileNameFromMultipartFile(MultipartFile file) {
|
||||||
|
String fileName = file.getOriginalFilename();
|
||||||
|
//判断是否为IE浏览器的文件名,IE浏览器下文件名会带有盘符信
|
||||||
|
// escaping dangerous characters to prevent XSS
|
||||||
|
assert fileName != null;
|
||||||
|
fileName = HtmlUtils.htmlEscape(fileName, KkFileUtils.DEFAULT_FILE_ENCODING);
|
||||||
|
|
||||||
|
// Check for Unix-style path
|
||||||
|
int unixSep = fileName.lastIndexOf('/');
|
||||||
|
// Check for Windows-style path
|
||||||
|
int winSep = fileName.lastIndexOf('\\');
|
||||||
|
// Cut off at latest possible point
|
||||||
|
int pos = (Math.max(winSep, unixSep));
|
||||||
|
if (pos != -1) {
|
||||||
|
fileName = fileName.substring(pos + 1);
|
||||||
|
}
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 从url中获取文件后缀
|
* 从url中获取文件后缀
|
||||||
|
|||||||
@@ -3,22 +3,22 @@ package cn.keking.web.controller;
|
|||||||
import cn.keking.config.ConfigConstants;
|
import cn.keking.config.ConfigConstants;
|
||||||
import cn.keking.model.ReturnResponse;
|
import cn.keking.model.ReturnResponse;
|
||||||
import cn.keking.utils.KkFileUtils;
|
import cn.keking.utils.KkFileUtils;
|
||||||
|
import cn.keking.utils.RarUtils;
|
||||||
import cn.keking.utils.WebUtils;
|
import cn.keking.utils.WebUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StreamUtils;
|
import org.springframework.util.StreamUtils;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.util.HtmlUtils;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -36,50 +36,21 @@ public class FileController {
|
|||||||
private final String demoDir = "demo";
|
private final String demoDir = "demo";
|
||||||
private final String demoPath = demoDir + File.separator;
|
private final String demoPath = demoDir + File.separator;
|
||||||
public static final String BASE64_DECODE_ERROR_MSG = "Base64解码失败,请检查你的 %s 是否采用 Base64 + urlEncode 双重编码了!";
|
public static final String BASE64_DECODE_ERROR_MSG = "Base64解码失败,请检查你的 %s 是否采用 Base64 + urlEncode 双重编码了!";
|
||||||
|
|
||||||
@PostMapping("/fileUpload")
|
@PostMapping("/fileUpload")
|
||||||
public ReturnResponse<Object> fileUpload(@RequestParam("file") MultipartFile file) {
|
public ReturnResponse<Object> fileUpload(@RequestParam("file") MultipartFile file) {
|
||||||
if (ConfigConstants.getFileUploadDisable()) {
|
ReturnResponse<Object> checkResult = this.fileUploadCheck(file);
|
||||||
return ReturnResponse.failure("文件传接口已禁用");
|
if (checkResult.isFailure()) {
|
||||||
}
|
return checkResult;
|
||||||
// 获取文件名
|
|
||||||
String fileName = file.getOriginalFilename();
|
|
||||||
//判断是否为IE浏览器的文件名,IE浏览器下文件名会带有盘符信息
|
|
||||||
|
|
||||||
// escaping dangerous characters to prevent XSS
|
|
||||||
assert fileName != null;
|
|
||||||
fileName = HtmlUtils.htmlEscape(fileName, StandardCharsets.UTF_8.name());
|
|
||||||
|
|
||||||
// Check for Unix-style path
|
|
||||||
int unixSep = fileName.lastIndexOf('/');
|
|
||||||
// Check for Windows-style path
|
|
||||||
int winSep = fileName.lastIndexOf('\\');
|
|
||||||
// Cut off at latest possible point
|
|
||||||
int pos = (Math.max(winSep, unixSep));
|
|
||||||
if (pos != -1) {
|
|
||||||
fileName = fileName.substring(pos + 1);
|
|
||||||
}
|
|
||||||
String fileType= "";
|
|
||||||
int i = fileName.lastIndexOf('.');
|
|
||||||
if (i > 0) {
|
|
||||||
fileType= fileName.substring(i+1);
|
|
||||||
fileType= fileType.toLowerCase();
|
|
||||||
}
|
|
||||||
if (fileType.length() == 0 || fileType.equals("dll") || fileType.equals("exe") || fileType.equals("msi") ){
|
|
||||||
return ReturnResponse.failure(fileName+"不允许上传的文件");
|
|
||||||
}
|
|
||||||
// 判断是否存在同名文件
|
|
||||||
if (existsFile(fileName)) {
|
|
||||||
return ReturnResponse.failure("存在同名文件,请先删除原有文件再次上传");
|
|
||||||
}
|
}
|
||||||
File outFile = new File(fileDir + demoPath);
|
File outFile = new File(fileDir + demoPath);
|
||||||
if (!outFile.exists() && !outFile.mkdirs()) {
|
if (!outFile.exists() && !outFile.mkdirs()) {
|
||||||
logger.error("创建文件夹【{}】失败,请检查目录权限!", fileDir + demoPath);
|
logger.error("创建文件夹【{}】失败,请检查目录权限!", fileDir + demoPath);
|
||||||
}
|
}
|
||||||
logger.info("上传文件:{}", fileDir + demoPath + fileName);
|
String fileName = checkResult.getContent().toString();
|
||||||
|
logger.info("上传文件:{}{}{}", fileDir, demoPath, fileName);
|
||||||
try (InputStream in = file.getInputStream(); OutputStream out = Files.newOutputStream(Paths.get(fileDir + demoPath + fileName))) {
|
try (InputStream in = file.getInputStream(); OutputStream out = Files.newOutputStream(Paths.get(fileDir + demoPath + fileName))) {
|
||||||
StreamUtils.copy(in, out);
|
StreamUtils.copy(in, out);
|
||||||
in.close();
|
|
||||||
out.close();
|
|
||||||
return ReturnResponse.success(null);
|
return ReturnResponse.success(null);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("文件上传失败", e);
|
logger.error("文件上传失败", e);
|
||||||
@@ -88,21 +59,15 @@ public class FileController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/deleteFile")
|
@GetMapping("/deleteFile")
|
||||||
public ReturnResponse<Object> deleteFile(String fileName) {
|
public ReturnResponse<Object> deleteFile(String fileName,String password) {
|
||||||
if (fileName == null || fileName.length() == 0) {
|
ReturnResponse<Object> checkResult = this.deleteFileCheck(fileName);
|
||||||
return ReturnResponse.failure("文件名为空,删除失败!");
|
if (checkResult.isFailure()) {
|
||||||
|
return checkResult;
|
||||||
}
|
}
|
||||||
try {
|
fileName = checkResult.getContent().toString();
|
||||||
fileName = WebUtils.decodeUrl(fileName);
|
if(!ConfigConstants.getpassword().equalsIgnoreCase(password)){
|
||||||
} catch (Exception ex) {
|
logger.error("删除文件【{}】失败,密码错误!",fileName);
|
||||||
String errorMsg = String.format(BASE64_DECODE_ERROR_MSG, "url");
|
return ReturnResponse.failure("删除文件失败,密码错误!");
|
||||||
return ReturnResponse.failure(errorMsg+"删除失败!");
|
|
||||||
}
|
|
||||||
if (fileName.contains("/")) {
|
|
||||||
fileName = fileName.substring(fileName.lastIndexOf("/") + 1);
|
|
||||||
}
|
|
||||||
if (KkFileUtils.isIllegalFileName(fileName)) {
|
|
||||||
return ReturnResponse.failure("非法文件名,删除失败!");
|
|
||||||
}
|
}
|
||||||
File file = new File(fileDir + demoPath + fileName);
|
File file = new File(fileDir + demoPath + fileName);
|
||||||
logger.info("删除文件:{}", file.getAbsolutePath());
|
logger.info("删除文件:{}", file.getAbsolutePath());
|
||||||
@@ -119,7 +84,9 @@ public class FileController {
|
|||||||
List<Map<String, String>> list = new ArrayList<>();
|
List<Map<String, String>> list = new ArrayList<>();
|
||||||
File file = new File(fileDir + demoPath);
|
File file = new File(fileDir + demoPath);
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
Arrays.stream(Objects.requireNonNull(file.listFiles())).forEach(file1 -> {
|
File[] files = Objects.requireNonNull(file.listFiles());
|
||||||
|
Arrays.sort(files, (f1, f2) -> Long.compare(f2.lastModified(), f1.lastModified()));
|
||||||
|
Arrays.stream(files).forEach(file1 -> {
|
||||||
Map<String, String> fileName = new HashMap<>();
|
Map<String, String> fileName = new HashMap<>();
|
||||||
fileName.put("fileName", demoDir + "/" + file1.getName());
|
fileName.put("fileName", demoDir + "/" + file1.getName());
|
||||||
list.add(fileName);
|
list.add(fileName);
|
||||||
@@ -128,6 +95,75 @@ public class FileController {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件前校验
|
||||||
|
*
|
||||||
|
* @param file 文件
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
private ReturnResponse<Object> fileUploadCheck(MultipartFile file) {
|
||||||
|
if (ConfigConstants.getFileUploadDisable()) {
|
||||||
|
return ReturnResponse.failure("文件传接口已禁用");
|
||||||
|
}
|
||||||
|
String fileName = WebUtils.getFileNameFromMultipartFile(file);
|
||||||
|
if(fileName.lastIndexOf(".")==-1){
|
||||||
|
return ReturnResponse.failure("不允许上传的类型");
|
||||||
|
}
|
||||||
|
if (!KkFileUtils.isAllowedUpload(fileName)) {
|
||||||
|
return ReturnResponse.failure("不允许上传的文件类型: " + fileName);
|
||||||
|
}
|
||||||
|
if (KkFileUtils.isIllegalFileName(fileName)) {
|
||||||
|
return ReturnResponse.failure("不允许上传的文件名: " + fileName);
|
||||||
|
}
|
||||||
|
// 判断是否存在同名文件
|
||||||
|
if (existsFile(fileName)) {
|
||||||
|
return ReturnResponse.failure("存在同名文件,请先删除原有文件再次上传");
|
||||||
|
}
|
||||||
|
return ReturnResponse.success(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除文件前校验
|
||||||
|
*
|
||||||
|
* @param fileName 文件名
|
||||||
|
* @return 校验结果
|
||||||
|
*/
|
||||||
|
private ReturnResponse<Object> deleteFileCheck(String fileName) {
|
||||||
|
if (ObjectUtils.isEmpty(fileName)) {
|
||||||
|
return ReturnResponse.failure("文件名为空,删除失败!");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
fileName = WebUtils.decodeUrl(fileName);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
String errorMsg = String.format(BASE64_DECODE_ERROR_MSG, fileName);
|
||||||
|
return ReturnResponse.failure(errorMsg + "删除失败!");
|
||||||
|
}
|
||||||
|
assert fileName != null;
|
||||||
|
if (fileName.contains("/")) {
|
||||||
|
fileName = fileName.substring(fileName.lastIndexOf("/") + 1);
|
||||||
|
}
|
||||||
|
if (KkFileUtils.isIllegalFileName(fileName)) {
|
||||||
|
return ReturnResponse.failure("非法文件名,删除失败!");
|
||||||
|
}
|
||||||
|
return ReturnResponse.success(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/directory")
|
||||||
|
public Object directory(String urls) {
|
||||||
|
String fileUrl;
|
||||||
|
try {
|
||||||
|
fileUrl = WebUtils.decodeUrl(urls);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
String errorMsg = String.format(BASE64_DECODE_ERROR_MSG, "url");
|
||||||
|
return ReturnResponse.failure(errorMsg);
|
||||||
|
}
|
||||||
|
if (KkFileUtils.isIllegalFileName(fileUrl)) {
|
||||||
|
return ReturnResponse.failure("不允许访问的路径:");
|
||||||
|
}
|
||||||
|
return RarUtils.getTree(fileUrl);
|
||||||
|
}
|
||||||
|
|
||||||
private boolean existsFile(String fileName) {
|
private boolean existsFile(String fileName) {
|
||||||
File file = new File(fileDir + demoPath + fileName);
|
File file = new File(fileDir + demoPath + fileName);
|
||||||
return file.exists();
|
return file.exists();
|
||||||
|
|||||||
@@ -13,21 +13,28 @@ public class IndexController {
|
|||||||
|
|
||||||
@GetMapping( "/index")
|
@GetMapping( "/index")
|
||||||
public String go2Index(){
|
public String go2Index(){
|
||||||
return "index";
|
return "/main/index";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping( "/record")
|
@GetMapping( "/record")
|
||||||
public String go2Record(){
|
public String go2Record(){
|
||||||
return "record";
|
return "/main/record";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping( "/comment")
|
@GetMapping( "/sponsor")
|
||||||
public String go2Comment(){
|
public String go2Sponsor(){
|
||||||
return "comment";
|
return "/main/sponsor";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping( "/integrated")
|
||||||
|
public String go2Integrated(){
|
||||||
|
return "/main/integrated";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping( "/")
|
@GetMapping( "/")
|
||||||
public String root() {
|
public String root() {
|
||||||
return "redirect:/index";
|
return "/main/index";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ public class AttributeSetFilter implements Filter {
|
|||||||
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
request.setAttribute("fileKey", httpRequest.getParameter("fileKey"));
|
||||||
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
request.setAttribute("switchDisabled", ConfigConstants.getOfficePreviewSwitchDisabled());
|
||||||
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
request.setAttribute("fileUploadDisable", ConfigConstants.getFileUploadDisable());
|
||||||
|
request.setAttribute("BeiAn", ConfigConstants.getBeiAn());
|
||||||
|
request.setAttribute("size", ConfigConstants.maxsize());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ public class TrustHostFilter implements Filter {
|
|||||||
response.getWriter().write(html);
|
response.getWriter().write(html);
|
||||||
response.getWriter().close();
|
response.getWriter().close();
|
||||||
}
|
}
|
||||||
chain.doFilter(request, response);
|
else {
|
||||||
|
chain.doFilter(request, response);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|_|\_\ |_|\_\ |_| |_| |_| \___| \/ |_| \___| \_/\_/
|
|_|\_\ |_|\_\ |_| |_| |_| \___| \/ |_| \___| \_/\_/
|
||||||
|
|
||||||
=> Spring Boot :: ${spring-boot.version}
|
=> Spring Boot :: ${spring-boot.version}
|
||||||
=> kkFileView :: 4.2.0-SNAPSHOT
|
=> kkFileView :: 4.2.1
|
||||||
=> Home site :: https://kkview.cn
|
=> Home site :: https://kkview.cn
|
||||||
=> Github :: https://github.com/kekingcn/kkFileView
|
=> Github :: https://github.com/kekingcn/kkFileView
|
||||||
=> Gitee :: https://gitee.com/kekingcn/file-online-preview
|
=> Gitee :: https://gitee.com/kekingcn/file-online-preview
|
||||||
|
|||||||
144
server/src/main/resources/static/bpmn/bpmn-js.css
Normal file
144
server/src/main/resources/static/bpmn/bpmn-js.css
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
.bjs-container {
|
||||||
|
--bjs-font-family: Arial, sans-serif;
|
||||||
|
|
||||||
|
--color-grey-225-10-15: hsl(225, 10%, 15%);
|
||||||
|
--color-grey-225-10-35: hsl(225, 10%, 35%);
|
||||||
|
--color-grey-225-10-55: hsl(225, 10%, 55%);
|
||||||
|
--color-grey-225-10-75: hsl(225, 10%, 75%);
|
||||||
|
--color-grey-225-10-80: hsl(225, 10%, 80%);
|
||||||
|
--color-grey-225-10-85: hsl(225, 10%, 85%);
|
||||||
|
--color-grey-225-10-90: hsl(225, 10%, 90%);
|
||||||
|
--color-grey-225-10-95: hsl(225, 10%, 95%);
|
||||||
|
--color-grey-225-10-97: hsl(225, 10%, 97%);
|
||||||
|
|
||||||
|
--color-blue-205-100-45: hsl(205, 100%, 45%);
|
||||||
|
--color-blue-205-100-45-opacity-30: hsla(205, 100%, 45%, 30%);
|
||||||
|
--color-blue-205-100-50: hsl(205, 100%, 50%);
|
||||||
|
--color-blue-205-100-95: hsl(205, 100%, 95%);
|
||||||
|
|
||||||
|
--color-green-150-86-44: hsl(150, 86%, 44%);
|
||||||
|
|
||||||
|
--color-red-360-100-40: hsl(360, 100%, 40%);
|
||||||
|
--color-red-360-100-45: hsl(360, 100%, 45%);
|
||||||
|
--color-red-360-100-92: hsl(360, 100%, 92%);
|
||||||
|
--color-red-360-100-97: hsl(360, 100%, 97%);
|
||||||
|
|
||||||
|
--color-white: hsl(0, 0%, 100%);
|
||||||
|
--color-black: hsl(0, 0%, 0%);
|
||||||
|
--color-black-opacity-05: hsla(0, 0%, 0%, 5%);
|
||||||
|
--color-black-opacity-10: hsla(0, 0%, 0%, 10%);
|
||||||
|
|
||||||
|
--breadcrumbs-font-family: var(--bjs-font-family);
|
||||||
|
--breadcrumbs-item-color: var(--color-blue-205-100-50);
|
||||||
|
--breadcrumbs-arrow-color: var(--color-black);
|
||||||
|
--drilldown-fill-color: var(--color-white);
|
||||||
|
--drilldown-background-color: var(--color-blue-205-100-50);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs {
|
||||||
|
position: absolute;
|
||||||
|
display: none;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
top: 30px;
|
||||||
|
left: 30px;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
font-family: var(--breadcrumbs-font-family);
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs-shown .bjs-breadcrumbs {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djs-palette-shown .bjs-breadcrumbs {
|
||||||
|
left: 90px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.djs-palette-shown.djs-palette-two-column .bjs-breadcrumbs {
|
||||||
|
left: 140px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs li {
|
||||||
|
display: inline-flex;
|
||||||
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs li a {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--breadcrumbs-item-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs li:last-of-type a {
|
||||||
|
color: inherit;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs li:not(:first-child)::before {
|
||||||
|
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" /><path d="M0 0h24v24H0z" fill="none" /></svg>');
|
||||||
|
padding: 0 8px;
|
||||||
|
color: var(--breadcrumbs-arrow-color);
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-breadcrumbs .bjs-crumb {
|
||||||
|
display: inline-block;
|
||||||
|
max-width: 200px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-drilldown {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
|
||||||
|
padding: 0px;
|
||||||
|
margin-left: -20px;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
border-radius: 2px;
|
||||||
|
outline: none;
|
||||||
|
|
||||||
|
fill: var(--drilldown-fill-color);
|
||||||
|
background-color: var(--drilldown-background-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bjs-drilldown-empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected .bjs-drilldown-empty {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] .djs-popup-results {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] .djs-popup-body [data-group] + [data-group] {
|
||||||
|
border-left: 1px solid var(--popup-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] [data-group="align"] {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] .djs-popup-body .entry {
|
||||||
|
padding: 6px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] .djs-popup-body .entry:not(:first-child) {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
[data-popup="align-elements"] .djs-popup-entry-icon {
|
||||||
|
display: block;
|
||||||
|
margin: 0;
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
|
}
|
||||||
62804
server/src/main/resources/static/bpmn/bpmn-modeler.development.js
Normal file
62804
server/src/main/resources/static/bpmn/bpmn-modeler.development.js
Normal file
File diff suppressed because one or more lines are too long
163
server/src/main/resources/static/bpmn/bpmn.css
Normal file
163
server/src/main/resources/static/bpmn/bpmn.css
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'bpmn';
|
||||||
|
src: url('../font/bpmn.eot?21877404');
|
||||||
|
src: url('../font/bpmn.eot?21877404#iefix') format('embedded-opentype'),
|
||||||
|
url('../font/bpmn.woff2?21877404') format('woff2'),
|
||||||
|
url('../font/bpmn.woff?21877404') format('woff'),
|
||||||
|
url('../font/bpmn.ttf?21877404') format('truetype'),
|
||||||
|
url('../font/bpmn.svg?21877404#bpmn') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||||
|
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||||
|
/*
|
||||||
|
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||||
|
@font-face {
|
||||||
|
font-family: 'bpmn';
|
||||||
|
src: url('../font/bpmn.svg?21877404#bpmn') format('svg');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
[class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before {
|
||||||
|
font-family: "bpmn";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: never;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
/* margin-right: .2em; */
|
||||||
|
text-align: center;
|
||||||
|
/* opacity: .8; */
|
||||||
|
|
||||||
|
/* For safety - reset parent styles, that can break glyph codes*/
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
|
||||||
|
/* fix buttons height, for twitter bootstrap */
|
||||||
|
line-height: 1em;
|
||||||
|
|
||||||
|
/* Animation center compensation - margins should be symmetric */
|
||||||
|
/* remove if not needed */
|
||||||
|
/* margin-left: .2em; */
|
||||||
|
|
||||||
|
/* you can be more comfortable with increased icons size */
|
||||||
|
/* font-size: 120%; */
|
||||||
|
|
||||||
|
/* Font smoothing. That was taken from TWBS */
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
/* Uncomment for 3D effect */
|
||||||
|
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.bpmn-icon-trash:before { content: '\e801'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */
|
||||||
|
.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */
|
||||||
|
.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */
|
||||||
|
.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */
|
||||||
|
.bpmn-icon-user-task:before { content: '\e817'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */
|
||||||
|
.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */
|
||||||
|
.bpmn-icon-task:before { content: '\e821'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */
|
||||||
|
.bpmn-icon-manual:before { content: '\e828'; } /* '' */
|
||||||
|
.bpmn-icon-receive:before { content: '\e829'; } /* '' */
|
||||||
|
.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */
|
||||||
|
.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */
|
||||||
|
.bpmn-icon-script:before { content: '\e83f'; } /* '' */
|
||||||
|
.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */
|
||||||
|
.bpmn-icon-send:before { content: '\e841'; } /* '' */
|
||||||
|
.bpmn-icon-service:before { content: '\e842'; } /* '' */
|
||||||
|
.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */
|
||||||
|
.bpmn-icon-user:before { content: '\e844'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */
|
||||||
|
.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */
|
||||||
|
.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */
|
||||||
|
.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */
|
||||||
|
.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */
|
||||||
|
.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */
|
||||||
|
.bpmn-icon-service-task:before { content: '\e856'; } /* '' */
|
||||||
|
.bpmn-icon-task-none:before { content: '\e857'; } /* '' */
|
||||||
|
.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */
|
||||||
|
.bpmn-icon-participant:before { content: '\e85c'; } /* '' */
|
||||||
|
.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */
|
||||||
|
.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */
|
||||||
|
.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */
|
||||||
|
.bpmn-icon-lane:before { content: '\e861'; } /* '' */
|
||||||
|
.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */
|
||||||
|
.bpmn-icon-data-input:before { content: '\e866'; } /* '' */
|
||||||
|
.bpmn-icon-data-output:before { content: '\e867'; } /* '' */
|
||||||
|
.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */
|
||||||
|
.bpmn-icon-group:before { content: '\e869'; } /* '' */
|
||||||
|
.bpmn-icon-text-annotation:before { content: '\e86b'; } /* '' */
|
||||||
|
.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */
|
||||||
|
.bpmn-icon-screw-wrench:before { content: '\e8db'; } /* '' */
|
||||||
|
.bpmn-icon-connection:before { content: '\e8dc'; } /* '' */
|
||||||
|
.bpmn-icon-conditional-flow:before { content: '\e8e0'; } /* '' */
|
||||||
|
.bpmn-icon-default-flow:before { content: '\e8e1'; } /* '' */
|
||||||
108
server/src/main/resources/static/bpmn/css/bpmn-codes.css
Normal file
108
server/src/main/resources/static/bpmn/css/bpmn-codes.css
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
|
||||||
|
.bpmn-icon-trash:before { content: '\e801'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */
|
||||||
|
.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */
|
||||||
|
.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */
|
||||||
|
.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */
|
||||||
|
.bpmn-icon-user-task:before { content: '\e817'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */
|
||||||
|
.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */
|
||||||
|
.bpmn-icon-task:before { content: '\e821'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */
|
||||||
|
.bpmn-icon-manual:before { content: '\e828'; } /* '' */
|
||||||
|
.bpmn-icon-receive:before { content: '\e829'; } /* '' */
|
||||||
|
.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */
|
||||||
|
.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */
|
||||||
|
.bpmn-icon-script:before { content: '\e83f'; } /* '' */
|
||||||
|
.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */
|
||||||
|
.bpmn-icon-send:before { content: '\e841'; } /* '' */
|
||||||
|
.bpmn-icon-service:before { content: '\e842'; } /* '' */
|
||||||
|
.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */
|
||||||
|
.bpmn-icon-user:before { content: '\e844'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */
|
||||||
|
.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */
|
||||||
|
.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */
|
||||||
|
.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */
|
||||||
|
.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */
|
||||||
|
.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */
|
||||||
|
.bpmn-icon-service-task:before { content: '\e856'; } /* '' */
|
||||||
|
.bpmn-icon-task-none:before { content: '\e857'; } /* '' */
|
||||||
|
.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */
|
||||||
|
.bpmn-icon-participant:before { content: '\e85c'; } /* '' */
|
||||||
|
.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */
|
||||||
|
.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */
|
||||||
|
.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */
|
||||||
|
.bpmn-icon-lane:before { content: '\e861'; } /* '' */
|
||||||
|
.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */
|
||||||
|
.bpmn-icon-data-input:before { content: '\e866'; } /* '' */
|
||||||
|
.bpmn-icon-data-output:before { content: '\e867'; } /* '' */
|
||||||
|
.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */
|
||||||
|
.bpmn-icon-group:before { content: '\e869'; } /* '' */
|
||||||
|
.bpmn-icon-text-annotation:before { content: '\e86b'; } /* '' */
|
||||||
|
.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */
|
||||||
|
.bpmn-icon-screw-wrench:before { content: '\e8db'; } /* '' */
|
||||||
|
.bpmn-icon-connection:before { content: '\e8dc'; } /* '' */
|
||||||
|
.bpmn-icon-conditional-flow:before { content: '\e8e0'; } /* '' */
|
||||||
|
.bpmn-icon-default-flow:before { content: '\e8e1'; } /* '' */
|
||||||
166
server/src/main/resources/static/bpmn/css/bpmn-embedded.css
Normal file
166
server/src/main/resources/static/bpmn/css/bpmn-embedded.css
Normal file
File diff suppressed because one or more lines are too long
163
server/src/main/resources/static/bpmn/css/bpmn.css
Normal file
163
server/src/main/resources/static/bpmn/css/bpmn.css
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'bpmn';
|
||||||
|
src: url('../font/bpmn.eot?21877404');
|
||||||
|
src: url('../font/bpmn.eot?21877404#iefix') format('embedded-opentype'),
|
||||||
|
url('../font/bpmn.woff2?21877404') format('woff2'),
|
||||||
|
url('../font/bpmn.woff?21877404') format('woff'),
|
||||||
|
url('../font/bpmn.ttf?21877404') format('truetype'),
|
||||||
|
url('../font/bpmn.svg?21877404#bpmn') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
|
||||||
|
/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
|
||||||
|
/*
|
||||||
|
@media screen and (-webkit-min-device-pixel-ratio:0) {
|
||||||
|
@font-face {
|
||||||
|
font-family: 'bpmn';
|
||||||
|
src: url('../font/bpmn.svg?21877404#bpmn') format('svg');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
[class^="bpmn-icon-"]:before, [class*=" bpmn-icon-"]:before {
|
||||||
|
font-family: "bpmn";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: normal;
|
||||||
|
speak: never;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
width: 1em;
|
||||||
|
/* margin-right: .2em; */
|
||||||
|
text-align: center;
|
||||||
|
/* opacity: .8; */
|
||||||
|
|
||||||
|
/* For safety - reset parent styles, that can break glyph codes*/
|
||||||
|
font-variant: normal;
|
||||||
|
text-transform: none;
|
||||||
|
|
||||||
|
/* fix buttons height, for twitter bootstrap */
|
||||||
|
line-height: 1em;
|
||||||
|
|
||||||
|
/* Animation center compensation - margins should be symmetric */
|
||||||
|
/* remove if not needed */
|
||||||
|
/* margin-left: .2em; */
|
||||||
|
|
||||||
|
/* you can be more comfortable with increased icons size */
|
||||||
|
/* font-size: 120%; */
|
||||||
|
|
||||||
|
/* Font smoothing. That was taken from TWBS */
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
/* Uncomment for 3D effect */
|
||||||
|
/* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
|
||||||
|
}
|
||||||
|
|
||||||
|
.bpmn-icon-trash:before { content: '\e801'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-parallel:before { content: '\e804'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-cancel:before { content: '\e805'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-message:before { content: '\e806'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-compensation:before { content: '\e807'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-parallel-multiple:before { content: '\e808'; } /* '' */
|
||||||
|
.bpmn-icon-loop-marker:before { content: '\e809'; } /* '' */
|
||||||
|
.bpmn-icon-parallel-mi-marker:before { content: '\e80a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-signal:before { content: '\e80b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-timer:before { content: '\e80c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-parallel-multiple:before { content: '\e80d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-compensation:before { content: '\e80e'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-xor:before { content: '\e80f'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-cancel:before { content: '\e811'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-condition:before { content: '\e812'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-parallel-multiple:before { content: '\e813'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-condition:before { content: '\e814'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-timer:before { content: '\e815'; } /* '' */
|
||||||
|
.bpmn-icon-sequential-mi-marker:before { content: '\e816'; } /* '' */
|
||||||
|
.bpmn-icon-user-task:before { content: '\e817'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule:before { content: '\e818'; } /* '' */
|
||||||
|
.bpmn-icon-sub-process-marker:before { content: '\e819'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-parallel-multiple:before { content: '\e81a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-error:before { content: '\e81b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-signal:before { content: '\e81c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-error:before { content: '\e81d'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-compensation:before { content: '\e81e'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-collapsed:before { content: '\e81f'; } /* '' */
|
||||||
|
.bpmn-icon-subprocess-expanded:before { content: '\e820'; } /* '' */
|
||||||
|
.bpmn-icon-task:before { content: '\e821'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-error:before { content: '\e822'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-escalation:before { content: '\e823'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-timer:before { content: '\e824'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-escalation:before { content: '\e825'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-signal:before { content: '\e826'; } /* '' */
|
||||||
|
.bpmn-icon-business-rule-task:before { content: '\e827'; } /* '' */
|
||||||
|
.bpmn-icon-manual:before { content: '\e828'; } /* '' */
|
||||||
|
.bpmn-icon-receive:before { content: '\e829'; } /* '' */
|
||||||
|
.bpmn-icon-call-activity:before { content: '\e82a'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-timer:before { content: '\e82b'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-message:before { content: '\e82c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-none:before { content: '\e82d'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-link:before { content: '\e82e'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-escalation:before { content: '\e82f'; } /* '' */
|
||||||
|
.bpmn-icon-bpmn-io:before { content: '\e831'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-complex:before { content: '\e832'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-eventbased:before { content: '\e833'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-none:before { content: '\e834'; } /* '' */
|
||||||
|
.bpmn-icon-gateway-or:before { content: '\e835'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-terminate:before { content: '\e836'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-signal:before { content: '\e837'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-none:before { content: '\e838'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-multiple:before { content: '\e839'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-message:before { content: '\e83a'; } /* '' */
|
||||||
|
.bpmn-icon-end-event-link:before { content: '\e83b'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-message:before { content: '\e83c'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-compensation:before { content: '\e83d'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-multiple:before { content: '\e83e'; } /* '' */
|
||||||
|
.bpmn-icon-script:before { content: '\e83f'; } /* '' */
|
||||||
|
.bpmn-icon-manual-task:before { content: '\e840'; } /* '' */
|
||||||
|
.bpmn-icon-send:before { content: '\e841'; } /* '' */
|
||||||
|
.bpmn-icon-service:before { content: '\e842'; } /* '' */
|
||||||
|
.bpmn-icon-receive-task:before { content: '\e843'; } /* '' */
|
||||||
|
.bpmn-icon-user:before { content: '\e844'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-none:before { content: '\e845'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-escalation:before { content: '\e846'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-multiple:before { content: '\e847'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-escalation:before { content: '\e848'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-link:before { content: '\e849'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-condition:before { content: '\e84a'; } /* '' */
|
||||||
|
.bpmn-icon-data-object:before { content: '\e84b'; } /* '' */
|
||||||
|
.bpmn-icon-script-task:before { content: '\e84c'; } /* '' */
|
||||||
|
.bpmn-icon-send-task:before { content: '\e84d'; } /* '' */
|
||||||
|
.bpmn-icon-data-store:before { content: '\e84e'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-escalation:before { content: '\e84f'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-message:before { content: '\e850'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-multiple:before { content: '\e851'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-signal:before { content: '\e852'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-multiple:before { content: '\e853'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-message:before { content: '\e854'; } /* '' */
|
||||||
|
.bpmn-icon-ad-hoc-marker:before { content: '\e855'; } /* '' */
|
||||||
|
.bpmn-icon-service-task:before { content: '\e856'; } /* '' */
|
||||||
|
.bpmn-icon-task-none:before { content: '\e857'; } /* '' */
|
||||||
|
.bpmn-icon-compensation-marker:before { content: '\e858'; } /* '' */
|
||||||
|
.bpmn-icon-start-event-non-interrupting-multiple:before { content: '\e859'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-throw-signal:before { content: '\e85a'; } /* '' */
|
||||||
|
.bpmn-icon-intermediate-event-catch-non-interrupting-condition:before { content: '\e85b'; } /* '' */
|
||||||
|
.bpmn-icon-participant:before { content: '\e85c'; } /* '' */
|
||||||
|
.bpmn-icon-event-subprocess-expanded:before { content: '\e85d'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-below:before { content: '\e85e'; } /* '' */
|
||||||
|
.bpmn-icon-space-tool:before { content: '\e85f'; } /* '' */
|
||||||
|
.bpmn-icon-connection-multi:before { content: '\e860'; } /* '' */
|
||||||
|
.bpmn-icon-lane:before { content: '\e861'; } /* '' */
|
||||||
|
.bpmn-icon-lasso-tool:before { content: '\e862'; } /* '' */
|
||||||
|
.bpmn-icon-lane-insert-above:before { content: '\e863'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-three:before { content: '\e864'; } /* '' */
|
||||||
|
.bpmn-icon-lane-divide-two:before { content: '\e865'; } /* '' */
|
||||||
|
.bpmn-icon-data-input:before { content: '\e866'; } /* '' */
|
||||||
|
.bpmn-icon-data-output:before { content: '\e867'; } /* '' */
|
||||||
|
.bpmn-icon-hand-tool:before { content: '\e868'; } /* '' */
|
||||||
|
.bpmn-icon-group:before { content: '\e869'; } /* '' */
|
||||||
|
.bpmn-icon-text-annotation:before { content: '\e86b'; } /* '' */
|
||||||
|
.bpmn-icon-transaction:before { content: '\e8c4'; } /* '' */
|
||||||
|
.bpmn-icon-screw-wrench:before { content: '\e8db'; } /* '' */
|
||||||
|
.bpmn-icon-connection:before { content: '\e8dc'; } /* '' */
|
||||||
|
.bpmn-icon-conditional-flow:before { content: '\e8e0'; } /* '' */
|
||||||
|
.bpmn-icon-default-flow:before { content: '\e8e1'; } /* '' */
|
||||||
986
server/src/main/resources/static/bpmn/diagram-js.css
Normal file
986
server/src/main/resources/static/bpmn/diagram-js.css
Normal file
File diff suppressed because it is too large
Load Diff
BIN
server/src/main/resources/static/bpmn/font/bpmn.eot
Normal file
BIN
server/src/main/resources/static/bpmn/font/bpmn.eot
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user