Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
slm-fileview
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
梁杰芳
slm-fileview
Commits
a3485dd9
Unverified
Commit
a3485dd9
authored
Apr 06, 2021
by
gitchenjh
Committed by
GitHub
Apr 06, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #230 from gitchenjh/master
3.5.1版
parents
8f75df15
5a28b89f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
17 deletions
+18
-17
Dockerfile
Dockerfile
+3
-3
pom.xml
office-plugin/pom.xml
+1
-1
pom.xml
pom.xml
+1
-1
pom.xml
server/pom.xml
+1
-1
startup.bat
server/src/main/bin/startup.bat
+2
-2
startup.sh
server/src/main/bin/startup.sh
+1
-1
FilterConfiguration.java
...c/main/java/cn/keking/web/filter/FilterConfiguration.java
+0
-2
viewer.js
server/src/main/resources/static/pdfjs/web/viewer.js
+3
-5
pdf.ftl
server/src/main/resources/web/pdf.ftl
+6
-1
No files found.
Dockerfile
View file @
a3485dd9
...
...
@@ -28,5 +28,5 @@ ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV
PATH $PATH:$JAVA_HOME/bin
ENV
LANG zh_CN.UTF-8
ENV
LC_ALL zh_CN.UTF-8
ENV
KKFILEVIEW_BIN_FOLDER /opt/kkFileView-3.5/bin
ENTRYPOINT
["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-3.5/config/application.properties","-jar","/opt/kkFileView-3.5/bin/kkFileView-3.5.jar"]
\ No newline at end of file
ENV
KKFILEVIEW_BIN_FOLDER /opt/kkFileView-3.5.1/bin
ENTRYPOINT
["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-3.5.1/config/application.properties","-jar","/opt/kkFileView-3.5.1/bin/kkFileView-3.5.1.jar"]
\ No newline at end of file
office-plugin/pom.xml
View file @
a3485dd9
...
...
@@ -7,7 +7,7 @@
<parent>
<artifactId>
filepreview
</artifactId>
<groupId>
cn.keking
</groupId>
<version>
3.5
</version>
<version>
3.5
.1
</version>
</parent>
<artifactId>
office-plugin
</artifactId>
...
...
pom.xml
View file @
a3485dd9
...
...
@@ -6,7 +6,7 @@
<groupId>
cn.keking
</groupId>
<artifactId>
filepreview
</artifactId>
<version>
3.5
</version>
<version>
3.5
.1
</version>
<properties>
<java.version>
1.8
</java.version>
...
...
server/pom.xml
View file @
a3485dd9
...
...
@@ -6,7 +6,7 @@
<parent>
<artifactId>
filepreview
</artifactId>
<groupId>
cn.keking
</groupId>
<version>
3.5
</version>
<version>
3.5
.1
</version>
</parent>
<artifactId>
kkFileView
</artifactId>
...
...
server/src/main/bin/startup.bat
View file @
a3485dd9
...
...
@@ -6,4 +6,4 @@ echo Starting kkFileView...
echo Please check log file in ../log/kkFileView.log for more information
echo You can get help in our official homesite: https://kkFileView.keking.cn
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-3.5.jar -> ..\log\kkFileView.log
\ No newline at end of file
java -Dspring.config.location=..\config\application.properties -jar kkFileView-3.5.1.jar -> ..\log\kkFileView.log
\ No newline at end of file
server/src/main/bin/startup.sh
View file @
a3485dd9
...
...
@@ -29,4 +29,4 @@ echo "Starting kkFileView..."
echo
"Please execute ./showlog.sh to check log for more information"
echo
"You can get help in our official homesite: https://kkFileView.keking.cn"
echo
"If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers"
nohup
java
-Dfile
.encoding
=
UTF-8
-Dspring
.config.location
=
../config/application.properties
-jar
kkFileView-3.5.jar
>
../log/kkFileView.log 2>&1 &
nohup
java
-Dfile
.encoding
=
UTF-8
-Dspring
.config.location
=
../config/application.properties
-jar
kkFileView-3.5.
1.
jar
>
../log/kkFileView.log 2>&1 &
server/src/main/java/cn/keking/web/filter/FilterConfiguration.java
View file @
a3485dd9
...
...
@@ -30,8 +30,6 @@ public class FilterConfiguration {
Set
<
String
>
filterUri
=
new
HashSet
<>();
filterUri
.
add
(
"/onlinePreview"
);
filterUri
.
add
(
"/picturesPreview"
);
filterUri
.
add
(
"/getCorsFile"
);
filterUri
.
add
(
"/addTask"
);
TrustHostFilter
filter
=
new
TrustHostFilter
();
FilterRegistrationBean
registrationBean
=
new
FilterRegistrationBean
();
registrationBean
.
setFilter
(
filter
);
...
...
server/src/main/resources/static/pdfjs/web/viewer.js
View file @
a3485dd9
...
...
@@ -2019,7 +2019,7 @@ var validateFileURL;
{
var
HOSTED_VIEWER_ORIGINS
=
[
"null"
,
"http://mozilla.github.io"
,
"https://mozilla.github.io"
];
validateFileURL
=
function
validateFileURL
(
file
,
base
)
{
validateFileURL
=
function
validateFileURL
(
file
)
{
if
(
file
===
undefined
)
{
return
;
}
...
...
@@ -2036,7 +2036,7 @@ var validateFileURL;
protocol
=
_ref11
.
protocol
;
if
(
origin
!==
viewerOrigin
&&
protocol
!==
"blob:"
)
{
return
(
base
.
endsWith
(
'/'
)
?
base
:
base
+
'/'
)
+
'getCorsFile?urlPath='
+
encodeURIComponent
(
file
);
throw
new
Error
(
"file origin does not match viewer's"
);
}
}
catch
(
ex
)
{
var
message
=
ex
&&
ex
.
message
;
...
...
@@ -2089,14 +2089,12 @@ function loadAndEnablePDFBug(enabledTabs) {
function
webViewerInitialized
()
{
var
appConfig
=
PDFViewerApplication
.
appConfig
;
var
file
;
var
base
;
var
disableDownload
;
var
queryString
=
document
.
location
.
search
.
substring
(
1
);
var
params
=
(
0
,
_ui_utils
.
parseQueryString
)(
queryString
);
file
=
"file"
in
params
?
params
.
file
:
_app_options
.
AppOptions
.
get
(
"defaultUrl"
);
base
=
'base'
in
params
?
params
.
base
:
appConfig
.
defaultUrl
;
disableDownload
=
'disabledownload'
in
params
?
params
.
disabledownload
:
'false'
;
validateFileURL
(
file
,
base
);
validateFileURL
(
file
);
var
fileInput
=
document
.
createElement
(
"input"
);
fileInput
.
id
=
appConfig
.
openFileInputName
;
fileInput
.
className
=
"fileInput"
;
...
...
server/src/main/resources/web/pdf.ftl
View file @
a3485dd9
...
...
@@ -21,7 +21,12 @@
</
#
if>
</body>
<script
type=
"text/javascript"
>
document
.
getElementsByTagName
(
'iframe'
)[
0
].
src
=
"${baseUrl}pdfjs/web/viewer.html?base=${baseUrl}&file="
+
encodeURIComponent
(
'${finalUrl}'
)
+
"&disabledownload=${pdfDownloadDisable}"
;
var
url
=
'${finalUrl}'
;
var
baseUrl
=
'${baseUrl}'
.
endsWith
(
'/'
)
?
'${baseUrl}'
:
'${baseUrl}'
+
'/'
;
if
(
!
url
.
startsWith
(
baseUrl
))
{
url
=
baseUrl
+
'getCorsFile?urlPath='
+
encodeURIComponent
(
url
);
}
document
.
getElementsByTagName
(
'iframe'
)[
0
].
src
=
"${baseUrl}pdfjs/web/viewer.html?file="
+
encodeURIComponent
(
url
)
+
"&disabledownload=${pdfDownloadDisable}"
;
document
.
getElementsByTagName
(
'iframe'
)[
0
].
height
=
document
.
documentElement
.
clientHeight
-
10
;
/**
* 页面变化调整高度
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment