Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ClientServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
YAPEX
ClientServer
Commits
09f61e15
Commit
09f61e15
authored
2 weeks ago
by
Janis Daniel Dähne
Browse files
Options
Downloads
Patches
Plain Diff
- added check for test asset size when not using form upload in create exercise test
parent
b7c4ee72
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/ClientServer/Config/Constants.cs
+1
-1
1 addition, 1 deletion
src/ClientServer/Config/Constants.cs
src/ClientServer/Controllers/Core/Exercises/ExerciseEditorController.cs
+15
-0
15 additions, 0 deletions
...er/Controllers/Core/Exercises/ExerciseEditorController.cs
with
16 additions
and
1 deletion
src/ClientServer/Config/Constants.cs
+
1
−
1
View file @
09f61e15
...
...
@@ -13,7 +13,7 @@ namespace ClientServer.Helpers
/// </summary>
public
static
class
Constants
{
public
static
string
VersionString
=
"2.25.
1
"
;
public
static
string
VersionString
=
"2.25.
2
"
;
/// <summary>
/// this is only set once at program.cs!!
...
...
This diff is collapsed.
Click to expand it.
src/ClientServer/Controllers/Core/Exercises/ExerciseEditorController.cs
+
15
−
0
View file @
09f61e15
...
...
@@ -1771,6 +1771,21 @@ namespace ClientServer.Controllers.Core.Exercises
{
if
(!
await
base
.
IsLoggedIn
())
return
;
for
(
var
i
=
0
;
i
<
testFromFrontendWithData
.
Files
.
Count
;
i
++)
{
var
file
=
testFromFrontendWithData
.
Files
[
i
];
//TODO this is probably not right, we want the same as in setup.cs
//MultipartBodyLengthLimit
if
(
file
.
Content
.
Count
>
AppConfiguration
.
MaxUploadFileSizeInByte
)
{
await
Response
.
WriteAsync
(
Jc
.
Serialize
(
new
BasicResponse
(
ResponseCode
.
InvalidRequest
,
"test asset with index "
+
i
+
" too large"
)));
return
;
}
}
int
userId
=
GetUserId
();
List
<
TestType
>
allTestTypes
=
await
_context
.
TestTypes
.
ToListAsync
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment