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
jenkins
slm-fileview
Commits
1a4748bb
Commit
1a4748bb
authored
May 19, 2020
by
陈精华
Committed by
kl
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化:url特殊字符相关处理
parent
c0f7d602
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
PdfUtils.java
jodconverter-web/src/main/java/cn/keking/utils/PdfUtils.java
+1
-1
index.ftl
jodconverter-web/src/main/resources/web/index.ftl
+1
-1
No files found.
jodconverter-web/src/main/java/cn/keking/utils/PdfUtils.java
View file @
1a4748bb
...
@@ -38,7 +38,7 @@ public class PdfUtils {
...
@@ -38,7 +38,7 @@ public class PdfUtils {
String
pdfFolder
=
pdfName
.
substring
(
0
,
pdfName
.
length
()
-
4
);
String
pdfFolder
=
pdfName
.
substring
(
0
,
pdfName
.
length
()
-
4
);
String
urlPrefix
=
null
;
String
urlPrefix
=
null
;
try
{
try
{
urlPrefix
=
baseUrl
+
URLEncoder
.
encode
(
URLEncoder
.
encode
(
pdfFolder
,
uriEncoding
),
uriEncoding
);
urlPrefix
=
baseUrl
+
URLEncoder
.
encode
(
URLEncoder
.
encode
(
pdfFolder
,
uriEncoding
)
.
replaceAll
(
"\\+"
,
"%20"
)
,
uriEncoding
);
}
catch
(
UnsupportedEncodingException
e
)
{
}
catch
(
UnsupportedEncodingException
e
)
{
logger
.
error
(
"UnsupportedEncodingException"
,
e
);
logger
.
error
(
"UnsupportedEncodingException"
,
e
);
urlPrefix
=
baseUrl
+
pdfFolder
;
urlPrefix
=
baseUrl
+
pdfFolder
;
...
...
jodconverter-web/src/main/resources/web/index.ftl
View file @
1a4748bb
...
@@ -195,7 +195,7 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(fil
...
@@ -195,7 +195,7 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(fil
}).
on
(
'pre-body.bs.table'
,
function
(
e
,
data
)
{
}).
on
(
'pre-body.bs.table'
,
function
(
e
,
data
)
{
// 每个data添加一列用来操作
// 每个data添加一列用来操作
$
(
data
).
each
(
function
(
index
,
item
)
{
$
(
data
).
each
(
function
(
index
,
item
)
{
item
.
action
=
"<a class='btn btn-default' target='_blank' href='${baseUrl}onlinePreview?url="
+
encodeURIComponent
(
'${baseUrl}'
+
item
.
fileName
)
+
"'>预览</a>"
+
item
.
action
=
"<a class='btn btn-default' target='_blank' href='${baseUrl}onlinePreview?url="
+
encodeURIComponent
(
'${baseUrl}'
+
encodeURI
(
item
.
fileName
)
)
+
"'>预览</a>"
+
"<a class='btn btn-default' href='javascript:void(0);' onclick='deleteFile(
\"
"
+
item
.
fileName
+
"
\"
)'>删除</a>"
;
"<a class='btn btn-default' href='javascript:void(0);' onclick='deleteFile(
\"
"
+
item
.
fileName
+
"
\"
)'>删除</a>"
;
});
});
return
data
;
return
data
;
...
...
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