Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
1a6681e7
Commit
1a6681e7
authored
Sep 06, 2025
by
daniel
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
d8e1cb4a
659f419c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
CommonController.java
...va/com/dlbridge/jadp/plugins/common/CommonController.java
+10
-0
No files found.
src/main/java/com/dlbridge/jadp/plugins/common/CommonController.java
View file @
1a6681e7
...
...
@@ -106,7 +106,17 @@ public class CommonController {
@ApiOperation
(
value
=
"参赛声明上传"
)
public
Result
<?>
uploadClaimer
(
@RequestPart
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"gCmptId"
)
Integer
gCmptId
)
{
try
{
// 检查文件大小是否超过1MB
long
maxFileSize
=
1024
*
1024
;
// 1MB
if
(
file
.
getSize
()
>
maxFileSize
)
{
return
Result
.
fail
().
setMsg
(
"上传文件大小不能超过1MB"
);
}
String
originalFilename
=
file
.
getOriginalFilename
();
if
(
originalFilename
==
null
||
originalFilename
.
isEmpty
())
{
return
Result
.
fail
().
setMsg
(
"文件名不能为空"
);
}
assert
originalFilename
!=
null
;
// 检查文件名中是否包含点号
int
lastIndex
=
originalFilename
.
lastIndexOf
(
"."
);
...
...
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