namespace CMSMicroservice.Application.Common.Interfaces; /// /// Service for uploading files to FMS (File Management Service) /// public interface IFileManagementService { /// /// Uploads a file to FMS and returns the stored file path /// /// Target directory path (e.g. "Images/Products") /// Raw file bytes /// MIME type (e.g. "image/jpeg") /// Original file name /// Cancellation token /// The stored file path returned by FMS, or null if upload failed Task UploadFileAsync(string directory, byte[] fileBytes, string mime, string? fileName, CancellationToken cancellationToken = default); /// /// Uploads an image to FMS with optimization (resize + compress) /// Returns both main image path and thumbnail path /// /// Target directory path (e.g. "Images/Products") /// Raw image bytes /// MIME type (e.g. "image/jpeg") /// Original file name /// Cancellation token /// Tuple of (mainImagePath, thumbnailPath), either can be null if upload failed Task<(string? MainImagePath, string? ThumbnailPath)> UploadImageWithThumbnailAsync( string directory, byte[] fileBytes, string mime, string? fileName, CancellationToken cancellationToken = default); /// /// Deletes a file from FMS by its ID /// Task DeleteFileAsync(long fileId, CancellationToken cancellationToken = default); }