namespace HoneyBox.Core.Interfaces;

/// <summary>
/// 图片上传服务接口
/// </summary>
public interface IImageUploadService
{
    /// <summary>
    /// 上传Base64编码的图片到云存储
    /// </summary>
    /// <param name="base64Image">Base64编码的图片数据（可包含data:image/xxx;base64,前缀）</param>
    /// <param name="fileNamePrefix">文件名前缀，如 "avatar"</param>
    /// <returns>上传后的图片URL，失败返回null</returns>
    Task<string?> UploadBase64ImageAsync(string base64Image, string fileNamePrefix = "image");

    /// <summary>
    /// 上传文件流到云存储
    /// </summary>
    /// <param name="stream">文件流</param>
    /// <param name="fileName">原始文件名</param>
    /// <param name="contentType">MIME类型</param>
    /// <param name="prefix">存储路径前缀</param>
    /// <returns>上传后的图片URL，失败返回null</returns>
    Task<string?> UploadStreamAsync(Stream stream, string fileName, string contentType, string prefix = "uploads");
}
