The accessor for the file provider.
The following code initializes the file provider. When running a GET request to '/file/example[/id[/auth]]', this method is called. Supports authenticators like websocket decorators do.
@ProvideFile("example")
@Auth(new Authenticator(4)) // optional
async provideFile(id: string, auth: string) {
return new ProvidedFile(
+id,
"Example",
content,
contentType
);
}
Generated using TypeDoc
Decorator that marks a method as a file provider. The method will be called when a request is made to retrieve a file.
Supported Decorators:
@Auth