Files
Govor/Govor.Application/Interfaces/Medias/IMediaService.cs
T
Artemy 6063aafd9e Refactor friend request and media services, remove console commands
Refactored the friend request command service and SignalR hub to return and broadcast FriendshipDto objects, improving real-time updates. Enhanced media upload and download logic to support file storage and retrieval, including database integration. Removed all command classes and related infrastructure from the Govor.Console project, streamlining the console client. Updated dependency injection and interfaces to reflect these changes.
2025-07-13 19:03:01 +07:00

21 lines
569 B
C#

using Govor.Core.Models.Messages;
namespace Govor.Application.Interfaces.Medias;
public interface IMediaService
{
public Task<MediaUploadResult> UploadMediaAsync(Media file);
public Task DeleteMediaAsync(Guid fileId);
public Task<Media> GetMediaByUrlAsync(string url);
public Task<Media> GetMediaByIdAsync(Guid mediaId);
}
public record Media(Guid UploaderId,
DateTime UploadedOn,
byte[] Data,
string FileName,
MediaType Type,
string MineType,
string EncryptedKey);
public record MediaUploadResult(Guid? MediaId, string Url);