26 lines
829 B
C#
26 lines
829 B
C#
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);
|
|
}
|
|
}
|