23 lines
901 B
C#
23 lines
901 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Knot.Modules.Profiles.Application.Abstractions;
|
|
|
|
/// <summary>
|
|
/// Интерфейс для хранения аватаров в S3 (MinIO).
|
|
/// Отдельный от IFileStorageService модуля Storage,
|
|
/// чтобы не создавать прямой зависимости на Storage модуль.
|
|
/// </summary>
|
|
public interface IAvatarStorageService
|
|
{
|
|
/// <summary>
|
|
/// Загружает файл в S3-бакет аватаров и возвращает fileId (ключ объекта).
|
|
/// </summary>
|
|
Task<string> UploadAsync(System.IO.Stream stream, string fileName, string contentType, CancellationToken ct = default);
|
|
|
|
/// <summary>
|
|
/// Удаляет файл аватара из S3 по fileId.
|
|
/// </summary>
|
|
Task DeleteAsync(string fileId, CancellationToken ct = default);
|
|
}
|