Skip to main content

OutputFolderModule

A class in Root.Township, Alta.WebServer.

Server web module that lets a user download their own files from the FileDownload folder. Paths start with the user id, and the console token must belong to that user.

Constructors​

MemberWhat it is
OutputFolderModule(string baseRoute)Creates an OutputFolderModule from baseRoute.

Fields​

2 private and internal fields
MemberWhat it is
private FileModule fileModuleThe EmbedIO file module over the download folder.
private static Logger loggerClass logger.

Properties​

MemberWhat it is
override bool IsFinalHandler { get; }True: no later module handles the request.

Methods​

MemberWhat it is
void Dispose()Disposes the inner file module.
protected override void Finalize()Finalizer that disposes the module.
protected override async Task OnRequestAsync(IHttpContext context)Checks the path starts with a user id and the bearer token is a valid console token whose UserId claim matches, then serves the file.
protected override void OnStart(CancellationToken cancellationToken)Starts the inner file module.