# Class FilesController | EchoHub Documentation

# Class FilesController

Namespace
  EchoHub.Server.Controllers

Assembly
  EchoHub.Server.dll

    [ApiController]
    [Route("api/files")]
    [Authorize]
    [EnableRateLimiting("general")]
    public class FilesController : ControllerBase

Inheritance
  object
  ControllerBase
  FilesController

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## 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