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
2fe1e587
Commit
2fe1e587
authored
Sep 13, 2023
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/2023-08-31' into 'master'
文件后缀 See merge request
!1439
parents
02063651
0012f3c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+6
-3
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
2fe1e587
...
...
@@ -48,9 +48,6 @@ public class UploadController extends WebBaseController {
java
.
util
.
List
<
Map
<
String
,
Object
>>
picList
=
new
ArrayList
<>();
while
(
iter
.
hasNext
())
{
String
fileName
=
iter
.
next
();
//获取文件名后缀
String
suffix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)
+
1
);
logger
.
info
(
"文件的后缀为:{}"
,
suffix
);
List
<
MultipartFile
>
list
=
multiRequest
.
getMultiFileMap
().
get
(
fileName
);
Map
<
String
,
Object
>
map
=
null
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
...
...
@@ -66,6 +63,12 @@ public class UploadController extends WebBaseController {
//上传接口替换
// PicUploadResDTO picUploadResDTO = qqCloudPicService.uploadPic(
// GlobalVar.ctxPropertiesMap.get(GlobalInfo.QQPIC_KEY_ENTERPRISE), fileBuffer);
String
suffix
=
""
;
String
name
=
mf
.
getOriginalFilename
()
;
if
(
name
.
contains
(
"."
))
{
suffix
=
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
)
;
}
logger
.
info
(
"后缀={}"
,
suffix
);
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
if
(
UploadUtils
.
isPicture
(
suffix
))
{
cloudFileTypeEnum
=
CloudFileTypeEnum
.
IMAGE
;
...
...
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