Table of Contents

Class FilesController

Namespace
EchoHub.Server.Controllers
Assembly
EchoHub.Server.dll
[ApiController]
[Route("api/files")]
[Authorize]
[EnableRateLimiting("general")]
public class FilesController : ControllerBase
Inheritance
ControllerBase
FilesController
Inherited Members

Constructors

FilesController(FileStorageService)

public FilesController(FileStorageService fileStorage)

Parameters

fileStorage FileStorageService

Methods

GetFile(string)

Serves an uploaded file. Anonymous by design: the unguessable GUID in the URL is the access token (Discord-CDN-style capability URL), so attachment links can be opened directly in a browser and shared to IRC clients. E2E-encrypted room blobs are ciphertext at rest, so anonymous access reveals nothing for those channels.

[HttpGet("{fileId}")]
[AllowAnonymous]
public IActionResult GetFile(string fileId)

Parameters

fileId string

Returns

IActionResult