Merge pull request #3645 from thabaum/file-controller-upload-null

Handle null or empty formfile in UploadFile Method - Fixes #3646
This commit is contained in:
Shaun Walker
2024-01-15 08:55:04 -05:00
committed by GitHub

View File

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