Skip to content

Commit

Permalink
not allowing empty file upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Miroslav Šimko committed Sep 10, 2020
1 parent 9fc1b18 commit 888ee8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
3 changes: 3 additions & 0 deletions FileProviderWebServer/Controllers/FileProviderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public ContentResult FileContent()
[HttpPost]
public IActionResult Post([FromForm] string fileContent)
{
if (string.IsNullOrEmpty(fileContent))
return View("FileContentUpload");

_fileProviderService.FileContent = fileContent;

ViewBag.FileContent = _fileProviderService.FileContent;
Expand Down
16 changes: 4 additions & 12 deletions params.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,16 @@
"TopLevelAssembly": "Wrench.iam",
"Config": {
"WrenchSz": {
"value": "\"Large\"",
"unit": "Text",
"values": ["\"Large\"", "\"Medium\"", "\"Small\""]
"value": "\"Large\""
},
"JawOffset": {
"value": "11 mm",
"unit": "mm",
"values": []
"value": "11 mm"
},
"PartMaterial": {
"value": "\"Steel\"",
"unit": "Text",
"values": ["\"Cast Bronze\"", "\"Cast Iron\"", "\"Copper\"", "\"Gray Iron\"", "\"Stainless Steel\"", "\"Steel\""]
"value": "\"Steel\""
},
"iTrigger0": {
"value": "2 ul",
"unit": "ul",
"values": []
"value": "2 ul"
}
}
}

0 comments on commit 888ee8b

Please sign in to comment.