Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
2200a72f
Commit
2200a72f
authored
May 23, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
内容中台需复制图片
parent
7f50f2dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+4
-2
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
2200a72f
...
@@ -119,7 +119,9 @@ public class UploadController extends WebBaseController {
...
@@ -119,7 +119,9 @@ public class UploadController extends WebBaseController {
@RequestMapping
(
"copy-image-url"
)
@RequestMapping
(
"copy-image-url"
)
public
RestResponse
<
Object
>
imgUploadFee
(
String
filetype
,
String
fileUrl
,
@RequestParam
(
defaultValue
=
"0"
)
int
videoFlag
)
throws
Exception
{
public
RestResponse
<
Object
>
imgUploadFee
(
String
filetype
,
String
fileUrl
,
@RequestParam
(
defaultValue
=
"0"
)
int
videoFlag
)
throws
Exception
{
AuthorizedUser
user
=
SessionContextUtils
.
getLoginUser
();
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
enterpriseId
=
login
.
getEnterpriseId
()
;
EnterpriseDTO
en
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
)
;
URL
url
=
new
URL
(
fileUrl
);
URL
url
=
new
URL
(
fileUrl
);
URLConnection
connection
=
url
.
openConnection
();
URLConnection
connection
=
url
.
openConnection
();
connection
.
setConnectTimeout
(
1000
*
10
);
connection
.
setConnectTimeout
(
1000
*
10
);
...
@@ -129,7 +131,7 @@ public class UploadController extends WebBaseController {
...
@@ -129,7 +131,7 @@ public class UploadController extends WebBaseController {
if
(
videoFlag
==
1
)
{
if
(
videoFlag
==
1
)
{
type
=
CloudFileTypeEnum
.
VIDEO
;
type
=
CloudFileTypeEnum
.
VIDEO
;
}
}
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadFile
(
inputStream
,
filetype
,
type
,
user
.
getEnterpriseDTO
()
.
getFactoryCode
(),
CloudFileBusinessOptEnum
.
COMMON
)
;
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadFile
(
inputStream
,
filetype
,
type
,
en
.
getFactoryCode
(),
CloudFileBusinessOptEnum
.
COMMON
)
;
logger
.
info
(
"图片={}"
,
JSONObject
.
toJSONString
(
uploadInfo
));
logger
.
info
(
"图片={}"
,
JSONObject
.
toJSONString
(
uploadInfo
));
return
RestResponse
.
successResult
(
uploadInfo
);
return
RestResponse
.
successResult
(
uploadInfo
);
}
}
...
...
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