Files

25 lines
689 B
C#
Raw Permalink Normal View History

2023-07-29 10:19:42 +08:00
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using UEditor.Core;
namespace Hncore.Pass.OSS.Controllers
{
[Route("api/ueditor")]
[AllowAnonymous]
public class UEditorController : Controller
{
private readonly UEditorService _ueditorService;
public UEditorController(UEditorService ueditorService)
{
this._ueditorService = ueditorService;
}
[HttpGet, HttpPost]
public ContentResult Upload()
{
var response = _ueditorService.UploadAndGetResponse(this.Request.HttpContext);
return Content(response.Result, response.ContentType);
}
}
2020-10-07 20:25:03 +08:00
}