Handle null or empty formfile in UploadFile Method
This commit is contained in:
parent
c284edcd81
commit
35bb6b62d8
|
@ -360,7 +360,7 @@ namespace Oqtane.Controllers
|
||||||
[HttpPost("upload")]
|
[HttpPost("upload")]
|
||||||
public async Task UploadFile(string folder, IFormFile formfile)
|
public async Task UploadFile(string folder, IFormFile formfile)
|
||||||
{
|
{
|
||||||
if (formfile.Length <= 0)
|
if (formfile == null || formfile.Length <= 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user