Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety
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
耿迪迪
gassafety
Commits
d5b9bf01
Commit
d5b9bf01
authored
Jul 28, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图片日志打印 gengdidi
parent
13d1aa83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
CommonController.java
...va/com/zehong/web/controller/common/CommonController.java
+2
-0
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/common/CommonController.java
View file @
d5b9bf01
...
@@ -77,8 +77,10 @@ public class CommonController
...
@@ -77,8 +77,10 @@ public class CommonController
// String fileName = FileUploadUtils.upload(filePath, file);
// String fileName = FileUploadUtils.upload(filePath, file);
// String url = serverConfig.getUrl() + fileName;
// String url = serverConfig.getUrl() + fileName;
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
log
.
info
(
serverConfig
.
getUrl
(),
"serverConfig========================="
);
String
fileServer
=
serverConfig
.
getUrl
().
contains
(
"127"
)
&&
serverConfig
.
getUrl
().
contains
(
"8093"
)
&&
!
filePath
.
contains
(
"/data"
)?
serverConfig
.
getUrl
()
:
serverConfig
.
getUrl
().
replace
(
"127.0.0.1:8903"
,
"36.148.23.59:8901"
);
String
fileServer
=
serverConfig
.
getUrl
().
contains
(
"127"
)
&&
serverConfig
.
getUrl
().
contains
(
"8093"
)
&&
!
filePath
.
contains
(
"/data"
)?
serverConfig
.
getUrl
()
:
serverConfig
.
getUrl
().
replace
(
"127.0.0.1:8903"
,
"36.148.23.59:8901"
);
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
log
.
info
(
url
,
"fileRetrunUrl========================="
);
AjaxResult
ajax
=
AjaxResult
.
success
();
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"fileName"
,
fileName
);
ajax
.
put
(
"fileName"
,
fileName
);
ajax
.
put
(
"url"
,
url
);
ajax
.
put
(
"url"
,
url
);
...
...
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