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
67bed719
Commit
67bed719
authored
May 29, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传文件
parent
fe424a58
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
UploadImgController.java
...java/com/gic/plug/web/controller/UploadImgController.java
+8
-0
No files found.
src/main/java/com/gic/plug/web/controller/UploadImgController.java
View file @
67bed719
...
@@ -80,6 +80,8 @@ public class UploadImgController {
...
@@ -80,6 +80,8 @@ public class UploadImgController {
bucketName
=
BucketNameEnum
.
REPORT_50000
.
getName
();
bucketName
=
BucketNameEnum
.
REPORT_50000
.
getName
();
}
else
if
(
isMusic
(
fileSuffix
))
{
}
else
if
(
isMusic
(
fileSuffix
))
{
bucketName
=
BucketNameEnum
.
MUSIC_20000
.
getName
();
bucketName
=
BucketNameEnum
.
MUSIC_20000
.
getName
();
}
else
if
(
isVedio
(
fileSuffix
))
{
bucketName
=
BucketNameEnum
.
VIDEO_40000
.
getName
();
}
}
String
url
=
FileOperateUtils
.
simpleUploadFileFromLocal
(
targetFile
,
fieldCode
,
bucketName
);
String
url
=
FileOperateUtils
.
simpleUploadFileFromLocal
(
targetFile
,
fieldCode
,
bucketName
);
...
@@ -166,4 +168,10 @@ public class UploadImgController {
...
@@ -166,4 +168,10 @@ public class UploadImgController {
{
"wma"
,
"mpc"
,
"ogg"
,
"wav"
,
"mpeg"
,
"mp3"
};
{
"wma"
,
"mpc"
,
"ogg"
,
"wav"
,
"mpeg"
,
"mp3"
};
return
Arrays
.
stream
(
arr
).
anyMatch
(
e
->
e
.
equals
(
fileSuffix
));
return
Arrays
.
stream
(
arr
).
anyMatch
(
e
->
e
.
equals
(
fileSuffix
));
}
}
public
static
boolean
isVedio
(
String
fileSuffix
)
throws
Exception
{
String
[]
arr
=
{
"rm"
,
"rmvb"
,
"mp4"
,
"wmv"
,
"asf"
,
"asx"
,
"3gp"
,
"mov"
,
"m4v"
,
"avi"
,
"dat"
,
"mkv"
,
"flv"
,
"vob"
};
return
Arrays
.
stream
(
arr
).
anyMatch
(
e
->
e
.
equals
(
fileSuffix
));
}
}
}
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