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.
content
File Example:
@ProvideFile("example")@Auth(new Authenticator(4)) // optionalasync provideFile(id: string, auth: string) { return new ProvidedFile( +id, "Example", content, contentType );} Copy
@ProvideFile("example")@Auth(new Authenticator(4)) // optionalasync 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" );} Copy
@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.
Generated using TypeDoc
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:
The file can be accessed via GET /file/example/id/auth.
Image Example:
The image can be accessed via GET /image/example/id/auth.