Table of Contents

Class FileStorageService

Namespace
EchoHub.Server.Services
Assembly
EchoHub.Server.dll
public class FileStorageService
Inheritance
FileStorageService
Inherited Members

Constructors

FileStorageService(IConfiguration)

public FileStorageService(IConfiguration configuration)

Parameters

configuration IConfiguration

Methods

DeleteFile(string)

public void DeleteFile(string fileId)

Parameters

fileId string

GetFilePath(string)

public string? GetFilePath(string fileId)

Parameters

fileId string

Returns

string

GetStoredFileIds()

Returns the set of stored file ids (filenames without extension) currently on disk. One directory scan, so callers can bulk-check many attachments without a glob per file.

public HashSet<string> GetStoredFileIds()

Returns

HashSet<string>

SaveFileAsync(Stream, string)

public Task<(string fileId, string filePath)> SaveFileAsync(Stream stream, string fileName)

Parameters

stream Stream
fileName string

Returns

Task<(string EncryptionSalt, string WrappedRoomKey)>