namespace Infrastructure.FileUpload; /// /// Service for storing and retrieving uploaded files in S3-compatible object storage. /// public interface IFileStorageProvider { /// Uploads a file to the configured bucket. /// The object key (path) to store the file under. /// The file content. /// The MIME type of the file. /// A token to cancel the upload. Task UploadAsync( string key, Stream content, string contentType, CancellationToken cancellationToken = default ); /// Deletes a file from the configured bucket. /// The object key of the file to delete. /// A token to cancel the deletion. Task DeleteAsync(string key, CancellationToken cancellationToken = default); /// Generates a time-limited URL for retrieving a file directly from storage. /// The object key of the file. /// How long the URL remains valid. string GetPresignedUrl(string key, TimeSpan expiresIn); }