|
|
@ -23,28 +23,44 @@ spring.freemarker.expose-session-attributes = true
|
|
|
|
spring.freemarker.request-context-attribute = request
|
|
|
|
spring.freemarker.request-context-attribute = request
|
|
|
|
spring.freemarker.suffix = .ftl
|
|
|
|
spring.freemarker.suffix = .ftl
|
|
|
|
|
|
|
|
|
|
|
|
# office-plugin
|
|
|
|
# office设置
|
|
|
|
|
|
|
|
#openoffice或LibreOffice home路径
|
|
|
|
|
|
|
|
#office.home = C:\\Program Files (x86)\\OpenOffice 4
|
|
|
|
|
|
|
|
office.home = ${KK_OFFICE_HOME:default}
|
|
|
|
## office转换服务的进程数,默认开启两个进程
|
|
|
|
## office转换服务的进程数,默认开启两个进程
|
|
|
|
office.plugin.server.ports = 2001,2002
|
|
|
|
office.plugin.server.ports = 2001,2002
|
|
|
|
## office 转换服务 task 超时时间,默认五分钟
|
|
|
|
## office 转换服务 task 超时时间,默认五分钟
|
|
|
|
office.plugin.task.timeout = 5m
|
|
|
|
office.plugin.task.timeout = 5m
|
|
|
|
|
|
|
|
#生成限制 默认不限制 使用方法 (1-5)
|
|
|
|
|
|
|
|
office.pagerange = ${KK_OFFICE_PAGERANGE:false}
|
|
|
|
|
|
|
|
#生成水印 默认不启用 使用方法 (kkFileView)
|
|
|
|
|
|
|
|
office.watermark = ${KK_OFFICE_WATERMARK:false}
|
|
|
|
|
|
|
|
#OFFICE JPEG图片压缩
|
|
|
|
|
|
|
|
office.quality = ${KK_OFFICE_QUALITY:80}
|
|
|
|
|
|
|
|
#图像分辨率限制
|
|
|
|
|
|
|
|
office.maximageresolution = ${KK_OFFICE_MAXIMAGERESOLUTION:150}
|
|
|
|
|
|
|
|
#导出书签
|
|
|
|
|
|
|
|
office.exportbookmarks = ${KK_OFFICE_EXPORTBOOKMARKS:true}
|
|
|
|
|
|
|
|
#批注作为PDF的注释
|
|
|
|
|
|
|
|
office.exportnotes = ${KK_OFFICE_EXPORTNOTES:true}
|
|
|
|
|
|
|
|
#加密文档 生成的PDF文档 添加密码(密码为加密文档的密码)
|
|
|
|
|
|
|
|
office.documentopenpasswords = ${KK_OFFICE_DOCUMENTOPENPASSWORD:true}
|
|
|
|
|
|
|
|
#xlsx格式前端解析
|
|
|
|
|
|
|
|
office.type.web = ${KK_OFFICE_TYPE_WEB:web}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 其他核心设置
|
|
|
|
#预览生成资源路径(默认为打包根路径下的file目录下)
|
|
|
|
#预览生成资源路径(默认为打包根路径下的file目录下)
|
|
|
|
#file.dir = D:\\kkFileview\\
|
|
|
|
#file.dir = D:\\kkFileview\\
|
|
|
|
file.dir = ${KK_FILE_DIR:default}
|
|
|
|
file.dir = ${KK_FILE_DIR:default}
|
|
|
|
|
|
|
|
|
|
|
|
#允许预览的本地文件夹 默认不允许任何本地文件被预览
|
|
|
|
#允许预览的本地文件夹 默认不允许任何本地文件被预览
|
|
|
|
#WINDOWS参考 local.preview.dir = \D:\\kkFileview\\1\\1.txt (注意前面必须添加反斜杠)
|
|
|
|
#WINDOWS参考 local.preview.dir = \D:\\kkFileview\\1\\1.txt (注意前面必须添加反斜杠)
|
|
|
|
#LINUX参考 local.preview.dir = /opt/1.txt (注意前面必须是正斜杠)
|
|
|
|
#LINUX参考 local.preview.dir = /opt/1.txt (注意前面必须是正斜杠)
|
|
|
|
#使用方法 windows file://d:/1/1.txt linux file:/opt/1/1.txt
|
|
|
|
#使用方法 windows file://d:/1/1.txt linux file:/opt/1/1.txt
|
|
|
|
#file 协议参考:https://datatracker.ietf.org/doc/html/rfc8089
|
|
|
|
#file 协议参考:https://datatracker.ietf.org/doc/html/rfc8089
|
|
|
|
local.preview.dir = ${KK_LOCAL_PREVIEW_DIR:default}
|
|
|
|
local.preview.dir = ${KK_LOCAL_PREVIEW_DIR:default}
|
|
|
|
|
|
|
|
#是否启用缓存
|
|
|
|
|
|
|
|
cache.enabled = ${KK_CACHE_ENABLED:true}
|
|
|
|
#openoffice home路径
|
|
|
|
|
|
|
|
#office.home = C:\\Program Files (x86)\\OpenOffice 4
|
|
|
|
|
|
|
|
office.home = ${KK_OFFICE_HOME:default}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#缓存实现类型,不配默认为内嵌RocksDB(type = default)实现,可配置为redis(type = redis)实现(需要配置spring.redisson.address等参数)和 JDK 内置对象实现(type = jdk),
|
|
|
|
#缓存实现类型,不配默认为内嵌RocksDB(type = default)实现,可配置为redis(type = redis)实现(需要配置spring.redisson.address等参数)和 JDK 内置对象实现(type = jdk),
|
|
|
|
cache.type = ${KK_CACHE_TYPE:jdk}
|
|
|
|
cache.type = ${KK_CACHE_TYPE:jdk}
|
|
|
|
#redis连接,只有当cache.type = redis时才有用
|
|
|
|
#redis连接,只有当cache.type = redis时才有用
|
|
|
@ -54,20 +70,26 @@ spring.redisson.password = ${KK_SPRING_REDISSON_PASSWORD:}
|
|
|
|
cache.clean.enabled = ${KK_CACHE_CLEAN_ENABLED:true}
|
|
|
|
cache.clean.enabled = ${KK_CACHE_CLEAN_ENABLED:true}
|
|
|
|
#缓存自动清理时间,cache.clean.enabled = true时才有用,cron表达式,基于Quartz cron
|
|
|
|
#缓存自动清理时间,cache.clean.enabled = true时才有用,cron表达式,基于Quartz cron
|
|
|
|
cache.clean.cron = ${KK_CACHE_CLEAN_CRON:0 0 3 * * ?}
|
|
|
|
cache.clean.cron = ${KK_CACHE_CLEAN_CRON:0 0 3 * * ?}
|
|
|
|
|
|
|
|
|
|
|
|
#######################################可在运行时动态配置#######################################
|
|
|
|
#######################################可在运行时动态配置#######################################
|
|
|
|
#提供预览服务的地址,默认从请求url读,如果使用nginx等反向代理,需要手动设置
|
|
|
|
#提供预览服务的地址,默认从请求url读,如果使用nginx等反向代理,需要手动设置
|
|
|
|
#base.url = https://file.keking.cn
|
|
|
|
#base.url = https://file.keking.cn
|
|
|
|
base.url = ${KK_BASE_URL:default}
|
|
|
|
base.url = ${KK_BASE_URL:default}
|
|
|
|
|
|
|
|
|
|
|
|
#信任站点,多个用','隔开,设置了之后,会限制只能预览来自信任站点列表的文件,默认不限制
|
|
|
|
#信任站点,多个用','隔开,设置了之后,会限制只能预览来自信任站点列表的文件,默认不限制
|
|
|
|
#trust.host = kkview.cn
|
|
|
|
#trust.host = kkview.cn
|
|
|
|
trust.host = ${KK_TRUST_HOST:default}
|
|
|
|
trust.host = ${KK_TRUST_HOST:default}
|
|
|
|
|
|
|
|
|
|
|
|
#是否启用缓存
|
|
|
|
|
|
|
|
cache.enabled = ${KK_CACHE_ENABLED:true}
|
|
|
|
|
|
|
|
#文本类型,默认如下,可自定义添加
|
|
|
|
#文本类型,默认如下,可自定义添加
|
|
|
|
simText = ${KK_SIMTEXT:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd}
|
|
|
|
simText = ${KK_SIMTEXT:txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#FTP模块设置
|
|
|
|
|
|
|
|
#预览源为FTP时 FTP用户名,可在ftp url后面加参数ftp.username=ftpuser指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.username = ${KK_FTP_USERNAME:ftpuser}
|
|
|
|
|
|
|
|
#预览源为FTP时 FTP密码,可在ftp url后面加参数ftp.password=123456指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.password = ${KK_FTP_PASSWORD:123456}
|
|
|
|
|
|
|
|
#预览源为FTP时, FTP连接默认ControlEncoding(根据FTP服务器操作系统选择,Linux一般为UTF-8,Windows一般为GBK),可在ftp url后面加参数ftp.control.encoding=UTF-8指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.control.encoding = ${KK_FTP_CONTROL_ENCODING:UTF-8}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#视频设置
|
|
|
|
#多媒体类型,默认如下,可自定义添加
|
|
|
|
#多媒体类型,默认如下,可自定义添加
|
|
|
|
media = ${KK_MEDIA:mp3,wav,mp4,flv}
|
|
|
|
media = ${KK_MEDIA:mp3,wav,mp4,flv}
|
|
|
|
#是否开启多媒体类型转视频格式转换,目前可转换视频格式有:avi,mov,wmv,3gp,rm
|
|
|
|
#是否开启多媒体类型转视频格式转换,目前可转换视频格式有:avi,mov,wmv,3gp,rm
|
|
|
@ -75,12 +97,12 @@ media = ${KK_MEDIA:mp3,wav,mp4,flv}
|
|
|
|
media.convert.disable = ${KK_MEDIA_CONVERT_DISABLE:false}
|
|
|
|
media.convert.disable = ${KK_MEDIA_CONVERT_DISABLE:false}
|
|
|
|
#支持转换的视频类型
|
|
|
|
#支持转换的视频类型
|
|
|
|
convertMedias = ${KK_CONVERTMEDIAS:avi,mov,wmv,mkv,3gp,rm}
|
|
|
|
convertMedias = ${KK_CONVERTMEDIAS:avi,mov,wmv,mkv,3gp,rm}
|
|
|
|
#office类型文档(word ppt)样式,默认为图片(image),可配置为pdf(预览时也有按钮切换)
|
|
|
|
|
|
|
|
office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:image}
|
|
|
|
|
|
|
|
#是否关闭office预览切换开关,默认为false,可配置为true关闭
|
|
|
|
|
|
|
|
office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:false}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#PDF预览模块设置
|
|
|
|
#PDF预览模块设置
|
|
|
|
|
|
|
|
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
|
|
|
|
|
|
|
pdf2jpg.dpi = ${KK_PDF2JPG_DPI:144}
|
|
|
|
#是否禁止演示模式
|
|
|
|
#是否禁止演示模式
|
|
|
|
pdf.presentationMode.disable = ${KK_PDF_PRESENTATION_MODE_DISABLE:true}
|
|
|
|
pdf.presentationMode.disable = ${KK_PDF_PRESENTATION_MODE_DISABLE:true}
|
|
|
|
#是否禁止打开文件
|
|
|
|
#是否禁止打开文件
|
|
|
@ -93,13 +115,11 @@ pdf.download.disable = ${KK_PDF_DOWNLOAD_DISABLE:true}
|
|
|
|
pdf.bookmark.disable = ${KK_PDF_BOOKMARK_DISABLE:true}
|
|
|
|
pdf.bookmark.disable = ${KK_PDF_BOOKMARK_DISABLE:true}
|
|
|
|
#是否禁止签名
|
|
|
|
#是否禁止签名
|
|
|
|
pdf.disable.editing = ${KK_PDF_DISABLE_EDITING:false}
|
|
|
|
pdf.disable.editing = ${KK_PDF_DISABLE_EDITING:false}
|
|
|
|
|
|
|
|
#office类型文档(word ppt)样式,默认为图片(image),可配置为pdf(预览时也有按钮切换)
|
|
|
|
|
|
|
|
office.preview.type = ${KK_OFFICE_PREVIEW_TYPE:image}
|
|
|
|
|
|
|
|
#是否关闭office预览切换开关,默认为false,可配置为true关闭
|
|
|
|
|
|
|
|
office.preview.switch.disabled = ${KK_OFFICE_PREVIEW_SWITCH_DISABLED:false}
|
|
|
|
|
|
|
|
|
|
|
|
#预览源为FTP时 FTP用户名,可在ftp url后面加参数ftp.username=ftpuser指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.username = ${KK_FTP_USERNAME:ftpuser}
|
|
|
|
|
|
|
|
#预览源为FTP时 FTP密码,可在ftp url后面加参数ftp.password=123456指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.password = ${KK_FTP_PASSWORD:123456}
|
|
|
|
|
|
|
|
#预览源为FTP时, FTP连接默认ControlEncoding(根据FTP服务器操作系统选择,Linux一般为UTF-8,Windows一般为GBK),可在ftp url后面加参数ftp.control.encoding=UTF-8指定,不指定默认用配置的
|
|
|
|
|
|
|
|
ftp.control.encoding = ${KK_FTP_CONTROL_ENCODING:UTF-8}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#水印内容
|
|
|
|
#水印内容
|
|
|
|
#例:watermark.txt = ${WATERMARK_TXT:凯京科技内部文件,严禁外泄}
|
|
|
|
#例:watermark.txt = ${WATERMARK_TXT:凯京科技内部文件,严禁外泄}
|
|
|
@ -125,10 +145,9 @@ watermark.height = ${WATERMARK_HEIGHT:80}
|
|
|
|
watermark.angle = ${WATERMARK_ANGLE:10}
|
|
|
|
watermark.angle = ${WATERMARK_ANGLE:10}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#首页功能设置
|
|
|
|
#是否禁用首页文件上传
|
|
|
|
#是否禁用首页文件上传
|
|
|
|
file.upload.disable = ${KK_FILE_UPLOAD_ENABLED:false}
|
|
|
|
file.upload.disable = ${KK_FILE_UPLOAD_ENABLED:false}
|
|
|
|
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
|
|
|
|
|
|
|
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
|
|
|
|
|
|
|
# 备案信息,默认为空
|
|
|
|
# 备案信息,默认为空
|
|
|
|
beian = ${KK_BEIAN:default}
|
|
|
|
beian = ${KK_BEIAN:default}
|
|
|
|
#禁止上传类型
|
|
|
|
#禁止上传类型
|
|
|
@ -139,10 +158,14 @@ delete.captcha= ${KK_DELETE_CAPTCHA:false}
|
|
|
|
delete.password = ${KK_DELETE_PASSWORD:123456}
|
|
|
|
delete.password = ${KK_DELETE_PASSWORD:123456}
|
|
|
|
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
|
|
|
#删除 转换后OFFICE、CAD、TIFF、压缩包源文件 默认开启 节约磁盘空间
|
|
|
|
delete.source.file = ${KK_DELETE_SOURCE_FILE:true}
|
|
|
|
delete.source.file = ${KK_DELETE_SOURCE_FILE:true}
|
|
|
|
#配置PDF文件生成图片的像素大小,dpi 越高,图片质量越清晰,同时也会消耗更多的计算资源。
|
|
|
|
|
|
|
|
pdf2jpg.dpi = ${KK_PDF2JPG_DPI:144}
|
|
|
|
|
|
|
|
#xlsx格式前端解析
|
|
|
|
|
|
|
|
office.type.web = ${KK_OFFICE_TYPE_WEB:web}
|
|
|
|
#Tif类型设置
|
|
|
|
|
|
|
|
#Tif类型图片浏览模式:tif(利用前端js插件浏览);jpg(转换为jpg后前端显示);pdf(转换为pdf后显示,便于打印)
|
|
|
|
|
|
|
|
tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Cad类型设置
|
|
|
|
#Cad类型图片浏览模式:tif(利用前端js插件浏览);svg(转换为svg显示);pdf(转换为pdf后显示,便于打印)
|
|
|
|
#Cad类型图片浏览模式:tif(利用前端js插件浏览);svg(转换为svg显示);pdf(转换为pdf后显示,便于打印)
|
|
|
|
cad.preview.type = ${KK_CAD_PREVIEW_TYPE:svg}
|
|
|
|
cad.preview.type = ${KK_CAD_PREVIEW_TYPE:svg}
|
|
|
|
#Cad转换超时设置
|
|
|
|
#Cad转换超时设置
|
|
|
@ -150,18 +173,4 @@ cad.timeout =${KK_CAD_TIMEOUT:90}
|
|
|
|
#Cad转换线程设置
|
|
|
|
#Cad转换线程设置
|
|
|
|
cad.thread =${KK_CAD_THREAD:5}
|
|
|
|
cad.thread =${KK_CAD_THREAD:5}
|
|
|
|
|
|
|
|
|
|
|
|
#OFFICE转换模块设置
|
|
|
|
|
|
|
|
#生成限制 默认不限制 使用方法 (1-5)
|
|
|
|
|
|
|
|
office.pagerange = ${KK_OFFICE_PAGERANGE:false}
|
|
|
|
|
|
|
|
#生成水印 默认不启用 使用方法 (kkFileView)
|
|
|
|
|
|
|
|
office.watermark = ${KK_OFFICE_WATERMARK:false}
|
|
|
|
|
|
|
|
#OFFICE JPEG图片压缩
|
|
|
|
|
|
|
|
office.quality = ${KK_OFFICE_QUALITY:80}
|
|
|
|
|
|
|
|
#图像分辨率限制
|
|
|
|
|
|
|
|
office.maximageresolution = ${KK_OFFICE_MAXIMAGERESOLUTION:150}
|
|
|
|
|
|
|
|
#导出书签
|
|
|
|
|
|
|
|
office.exportbookmarks = ${KK_OFFICE_EXPORTBOOKMARKS:true}
|
|
|
|
|
|
|
|
#批注作为PDF的注释
|
|
|
|
|
|
|
|
office.exportnotes = ${KK_OFFICE_EXPORTNOTES:true}
|
|
|
|
|
|
|
|
#加密文档 生成的PDF文档 添加密码(密码为加密文档的密码)
|
|
|
|
|
|
|
|
office.documentopenpasswords = ${KK_OFFICE_DOCUMENTOPENPASSWORD:true}
|
|
|
|
|
|
|
|