Files
BuYuHouDuan/AdminSrc/AdminService/ImageUpload/IImageUploadService.cs
T

27 lines
712 B
C#
Raw Normal View History

2026-10-12 16:22:04 +08:00
using Microsoft.AspNetCore.Http;
namespace AdminService.ImageUpload
{
public interface IImageUploadService
{
bool ValidateImage(IFormFile file, out string errorMessage);
Task<(bool isOk, string path, string fileName, string errorMessage)> UploadImageAsync(IFormFile file, string? customName = null);
Task<List<BatchUploadResult>> UploadBatchImagesAsync(IFormFile[] files);
}
public class BatchUploadResult
{
public string OriginalFileName { get; set; } = string.Empty;
public bool Success { get; set; }
public string? Path { get; set; }
public string? FileName { get; set; }
public string? Message { get; set; }
}
}