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")]
|
||||
public async Task UploadFile(string folder, IFormFile formfile)
|
||||
{
|
||||
if (formfile.Length <= 0)
|
||||
if (formfile == null || formfile.Length <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user