Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
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
base_platform_enterprise
gic-webapp-plug
Commits
609b1115
Commit
609b1115
authored
Jun 05, 2020
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cos
parent
72d40392
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
UploadImgController.java
...java/com/gic/plug/web/controller/UploadImgController.java
+15
-0
No files found.
src/main/java/com/gic/plug/web/controller/UploadImgController.java
View file @
609b1115
...
@@ -48,6 +48,21 @@ public class UploadImgController {
...
@@ -48,6 +48,21 @@ public class UploadImgController {
return
RestResponse
.
success
(
picList
);
return
RestResponse
.
success
(
picList
);
}
}
@RequestMapping
(
"get-cos-secret"
)
@IgnoreLogin
public
RestResponse
getCosSecret
(
HttpServletRequest
request
)
throws
IOException
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"secretId"
,
"AKIDxpbnsmZ0KYtAKNd5f7QbbP3YyDJD6Rq3"
);
map
.
put
(
"secretKey"
,
"GLFwRjpmYviRzLUREqKcieS4VmsmU1Lc"
);
byte
[]
bytes
=
map
.
get
(
"secretKey"
).
getBytes
();
//Base64 加密
String
encoded
=
Base64
.
getEncoder
().
encodeToString
(
bytes
);
map
.
put
(
"secretKey"
,
encoded
);
map
.
put
(
"bucket"
,
"video-1251519181"
);
map
.
put
(
"region"
,
"ap-shanghai"
);
return
RestResponse
.
success
(
map
);
}
@RequestMapping
(
"upload-file"
)
@RequestMapping
(
"upload-file"
)
@IgnoreLogin
@IgnoreLogin
public
RestResponse
uploadFile
(
HttpServletRequest
request
)
throws
IOException
{
public
RestResponse
uploadFile
(
HttpServletRequest
request
)
throws
IOException
{
...
...
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