IFileStorage.cs 554 B

12345678910111213141516
  1. using Microsoft.AspNetCore.Http;
  2. namespace SharedKernel.Storage
  3. {
  4. public interface IFileStorage
  5. {
  6. // 물리 파일 저장
  7. Task<FileUploadResult?> SaveFileAsync(IFormFile? file, FileStoragePath path, string[] allowedExtensions, CancellationToken ct = default);
  8. // 에디터 첨부 파일 저장
  9. Task<FileUploadResult?> SaveBytesAsync(ReadOnlyMemory<byte> bytes, string extension, FileStoragePath path, CancellationToken ct = default);
  10. // 이미지 삭제
  11. void DeleteByUrl(string? url);
  12. }
  13. }