Handle null or empty formfile in UploadFile Method

This commit is contained in:
Cody
2024-01-12 14:08:15 -08:00
committed by GitHub
parent c284edcd81
commit 35bb6b62d8

View File

@ -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;
}