file service вынесен в bll. EsppDataController UploadTemplates
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
using PARR.API.Domain;
|
||||
|
||||
namespace PARR.API.Services.Interfaces
|
||||
{
|
||||
public interface IFileService
|
||||
{
|
||||
Task<UploadResult?> UploadAsync(IFormFile formFile, string[] rootFolderWithoutStorage);
|
||||
|
||||
/// <summary>
|
||||
/// Размер файла не превышает лимит?
|
||||
/// </summary>
|
||||
/// <param name="formFile"></param>
|
||||
/// <param name="limit"></param>
|
||||
/// <returns></returns>
|
||||
bool IsNotExceededLimit(IFormFile formFile, int limitMb);
|
||||
|
||||
/// <summary>
|
||||
/// Разрешено это расширение?
|
||||
/// </summary>
|
||||
/// <param name="formFile"></param>
|
||||
/// <param name="allowedExtensions"></param>
|
||||
/// <returns></returns>
|
||||
bool IsExtensionAllowed(IFormFile formFile, string[] allowedExtensions);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user