Module content

Description

The content module in Active-Connect provides functionalities to serve images and other files via HTTP. This module supports WebSocket authenticators, enabling secure access to files and images.

File Example:

@ProvideFile("example")
@Auth(new Authenticator(4)) // optional
async provideFile(id: string, auth: string) {
return new ProvidedFile(
+id,
"Example",
content,
contentType
);
}

The file can be accessed via GET /file/example/id/auth.

Image Example:

@ProvideImage("example")
async provideImage(id: string, auth: string) {
return ProvidedImage.getFromDataURL(
dataUrl,
id,
"Example"
);
}

The image can be accessed via GET /image/example/id/auth.

Index

Classes

Functions

Generated using TypeDoc