improvements to .NET MAUI file upload based on #3674 (credit @thabaum)

This commit is contained in:
sbwalker
2024-01-24 09:37:27 -05:00
parent d9beb4b660
commit d57d7ec4d8
3 changed files with 5 additions and 2 deletions

View File

@ -20,6 +20,7 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Formats.Png;
using System.Net.Http;
using Microsoft.AspNetCore.Cors;
// ReSharper disable StringIndexOfIsCultureSpecific.1
@ -358,6 +359,7 @@ namespace Oqtane.Controllers
}
// POST api/<controller>/upload
[EnableCors(Constants.MauiCorsPolicy)]
[HttpPost("upload")]
public async Task UploadFile(string folder, IFormFile formfile)
{