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
a6763531
Commit
a6763531
authored
3 years ago
by
zhangjianqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改上传地址变换
parent
6b7dc12c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
CommonController.java
...va/com/zehong/web/controller/common/CommonController.java
+3
-3
No files found.
gassafety-admin/src/main/java/com/zehong/web/controller/common/CommonController.java
View file @
a6763531
...
@@ -78,9 +78,9 @@ public class CommonController
...
@@ -78,9 +78,9 @@ public class CommonController
// String url = serverConfig.getUrl() + fileName;
// String url = serverConfig.getUrl() + fileName;
String
fileName
=
file
.
getOriginalFilename
();
String
fileName
=
file
.
getOriginalFilename
();
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"
);
if
(
fileServer
.
contains
(
"rqgw.zhkjgf.com"
)){
//
if(fileServer.contains("rqgw.zhkjgf.com")){
fileServer
=
serverConfig
.
getUrl
().
replace
(
"rqgw.zhkjgf.com"
,
"36.148.23.59:8901"
);
//
fileServer = serverConfig.getUrl().replace("rqgw.zhkjgf.com","36.148.23.59:8901");
}
//
}
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
String
url
=
fileServer
+
FileUploadUtils
.
upload
(
filePath
,
file
);
AjaxResult
ajax
=
AjaxResult
.
success
();
AjaxResult
ajax
=
AjaxResult
.
success
();
ajax
.
put
(
"fileName"
,
fileName
);
ajax
.
put
(
"fileName"
,
fileName
);
...
...
This diff is collapsed.
Click to expand it.
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