eip采用openoffice插件用于附件预览,安装部署过程如下
1.下载资源
https://www.openoffice.org/download/
根据操作系统选择对应的版本
2.启动OpenOffice服务
windows下(双击也可以)
OpenOffice 4的program目录下cmd
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
linux下:
cd /opt/openoffice4/program (下载路径)
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
3.在application.uat中增加以下配置并重启EIP项目
# 附件在线预览
file:
file.dir: /home/eip/conver/
office:
# 是否启用openoffice组件(设置为true也需要在服务器上安装openoffice才能使用)
enable: true
home: /opt/openoffice4
simText: txt,html,xml,java,properties,sql
media: mp3,mp4,flv,rmvb,wmv
converted.file.charset: utf-8
注意格式,一定要对齐