IProfilePictureService

Namespace: Backend.Interfaces
Assembly: Backend.dll

Defines operations for retrieving and uploading member profile pictures.

public interface IProfilePictureService

Methods


GetProfilePictureByPath(string)

Retrieves a profile picture by storage path.

Task<(Stream Stream, string ContentType)?> GetProfilePictureByPath(string path)

Parameters

NameTypeDescription
pathstringThe storage path of the profile picture.

Returns

TypeDescription
Task<Stream, Stream, string, ContentType>The picture stream and content type when found; otherwise null.

UploadProfilePicture(Guid, Guid, IFormFile?)

Uploads and assigns a profile picture for a member.

Task<string?> UploadProfilePicture(Guid fromMemberId, Guid userId, IFormFile? image)

Parameters

NameTypeDescription
fromMemberIdGuidThe ID of the member performing the upload.
userIdGuidThe ID of the member whose picture is updated.
imageIFormFileThe image file to upload.

Returns

TypeDescription
Task<string>The stored file path when uploaded; otherwise null.

On this page