Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-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
hg-smart
Commits
ff7c524f
Commit
ff7c524f
authored
Jul 24, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-07-24 app文件上传
parent
620eb6c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
FileUploadController.java
...va/com/baosight/hggp/controller/FileUploadController.java
+9
-2
No files found.
src/main/java/com/baosight/hggp/controller/FileUploadController.java
View file @
ff7c524f
package
com
.
baosight
.
hggp
.
controller
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.utils.QrCodeUtils
;
import
com.baosight.hggp.hg.mt.utils.UploadUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.iplat4j.core.ProjectInfo
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
...
...
@@ -39,8 +41,13 @@ public class FileUploadController {
public
Map
upload
(
MultipartFile
file
,
HttpServletRequest
request
)
throws
IOException
{
Map
resultMap
=
new
HashMap
();
try
{
//JSONObject upload = UploadUtils.upload((CommonsMultipartFile)file);
JSONObject
upload
=
UploadUtils
.
uploadFile
(
request
);
JSONObject
upload
=
new
JSONObject
();
String
projectEnv
=
ProjectInfo
.
getProjectEnv
();
if
(
CommonConstant
.
projectEnv
.
RUN
.
equalsIgnoreCase
(
projectEnv
))
{
upload
=
UploadUtils
.
upload
((
CommonsMultipartFile
)
file
);
}
else
{
upload
=
UploadUtils
.
uploadFile
(
request
);
}
resultMap
.
put
(
"id"
,
upload
.
getString
(
"docId"
));
resultMap
.
put
(
"status"
,
EiConstant
.
STATUS_SUCCESS
);
resultMap
.
put
(
"message"
,
"SUCCESS"
);
...
...
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