//
namespace SafeCampus.Web.Core;
[ApiDescriptionSettings(Tag = "文件上传控制器")]
public class UploadController : BaseController
{
private readonly IFileService _fileService;
public UploadController(IFileService fileService)
{
_fileService = fileService;
}
/// 1
/// 上传图片
///
///
///
[HttpPost("uploadImg")]
[DisplayName("上传图片")]
[DisableRequestSizeLimit]
public async Task UploadImg([FromForm] IFormFile file)
{
//先上传到本地,后面优化
return await _fileService.UploadFile(SysDictConst.FILE_ENGINE_LOCAL, file);
}
}