Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
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
platform
hp-smart
Commits
bedf29d1
Commit
bedf29d1
authored
Mar 14, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.前端预览图片
parent
95618ba3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
FileUtils.java
src/main/java/com/baosight/hpjx/util/FileUtils.java
+1
-1
No files found.
src/main/java/com/baosight/hpjx/util/FileUtils.java
View file @
bedf29d1
...
@@ -480,7 +480,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
...
@@ -480,7 +480,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
* @param response
* @param response
*/
*/
public
static
void
downloadUrlFile
(
String
url
,
String
fileName
,
HttpServletResponse
response
)
throws
IOException
{
public
static
void
downloadUrlFile
(
String
url
,
String
fileName
,
HttpServletResponse
response
)
throws
IOException
{
// 设置响应类型,图片直接预览
// 设置响应类型,图片
和PDF
直接预览
if
(
"jpg/jpeg/png/bmp/gif/tif/icon/ico"
.
contains
(
if
(
"jpg/jpeg/png/bmp/gif/tif/icon/ico"
.
contains
(
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)
+
1
).
toLowerCase
()))
{
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)
+
1
).
toLowerCase
()))
{
response
.
setContentType
(
"text/html; charset=UTF-8"
);
response
.
setContentType
(
"text/html; charset=UTF-8"
);
...
...
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