Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
long-tern-care-service
Project
Project
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
hubin
long-tern-care-service
Commits
63fa263c
Commit
63fa263c
authored
Feb 10, 2023
by
董天德
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_20230209_xuhd'
parents
1f15439d
733e21d1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
pom.xml
governance/pom.xml
+6
-0
FileUploadController.java
.../hungraim/ltc/system/controller/FileUploadController.java
+1
-1
bootstrap.yml
system/system-admin-service/src/main/resources/bootstrap.yml
+14
-4
No files found.
governance/pom.xml
View file @
63fa263c
...
...
@@ -102,6 +102,12 @@
<version>
0.0.1
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.hungraim.ltc
</groupId>
<artifactId>
account-api
</artifactId>
<version>
0.0.1
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
system/system-admin-service/src/main/java/com/hungraim/ltc/system/controller/FileUploadController.java
View file @
63fa263c
...
...
@@ -44,7 +44,7 @@ public class FileUploadController {
String
fileType
=
originalFilename
.
substring
(
file
.
getOriginalFilename
().
lastIndexOf
(
"."
));
List
<
String
>
fileTypes
=
fileUploadConfig
.
getType
();
log
.
info
(
"支持图片类型:"
+
fileTypes
+
",上传的图片类型:"
+
fileType
);
if
(!
fileTypes
.
contains
(
fileType
)){
if
(!
fileTypes
.
stream
().
anyMatch
(
e
->
e
.
equalsIgnoreCase
(
fileType
)
)){
log
.
info
(
"上传文件错误"
);
return
Result
.
failed
(
ResultCode
.
FILE_TYPE_ERROR
);
}
...
...
system/system-admin-service/src/main/resources/bootstrap.yml
View file @
63fa263c
...
...
@@ -36,9 +36,19 @@ file:
upload
:
path
:
E:/workspace/upload
type
:
-
.
JPG
-
.
JPEG
-
.
png
-
.
gif
-
.jpg
-
.jpeg
-
.png
-
.PNG
-
.bmp
-
.zip
-
.rar
-
.7z
-
.gz
-
.doc
-
.docx
-
.xls
-
.xlsx
-
.pdf
-
.txt
-
.csv
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