using Microsoft.AspNetCore.Http; namespace PowderCoating.Application.Interfaces; /// /// Handles upload, thumbnail generation, and deletion of catalog item images stored in Azure Blob Storage. /// All blobs are scoped under {companyId}/catalog/{itemId}/ so tenants never share a path. /// public interface ICatalogImageService { /// /// Uploads the image, generates a 200×200 JPEG thumbnail, stores both blobs, and returns their paths. /// On success the caller should persist the returned paths to CatalogItem.ImagePath and /// CatalogItem.ThumbnailPath. Any previously stored blobs for the same item are deleted first. /// Task<(bool Success, string ImagePath, string ThumbnailPath, string ErrorMessage)> UploadAsync( IFormFile file, int itemId, int companyId, string? existingImagePath, string? existingThumbnailPath); /// /// Downloads a catalog image blob and returns its raw bytes and content-type for streaming to the browser. /// Task<(bool Success, byte[] Content, string ContentType, string ErrorMessage)> DownloadAsync(string blobPath); /// /// Deletes both the full-size image and thumbnail blobs. Safe to call with null paths. /// Task DeleteAsync(string? imagePath, string? thumbnailPath); }