Files
Musify/Application/Contracts/Infrastructure/IStorageHandler.cs
T
2026-03-18 02:19:36 +01:00

17 lines
786 B
C#

using Ardalis.Result;
namespace Musify.Application.Contracts.Infrastructure
{
public interface IStorageHandler
{
Task<Result<Stream>> GetFileAsync(string bucketName, string keyName, CancellationToken cancellationToken);
Task<string> GetUrlAsync(string bucketName, string keyName, TimeSpan ExpirationTime, CancellationToken cancellationToken);
Task<Result<string>> UploadFileAsync(Stream sourceStream, string contentType, string bucketName, string keyName, CancellationToken cancellationToken);
Task<Result> TransferFilesAsync(string sourceDirectory, string bucketName, string route, CancellationToken cancellationToken);
Task<Result> RemoveFileAsync(string bucketName, string keyName, CancellationToken cancellationToken);
}
}