Skip to content

TypeScript API / laikacms/file-sanitizer / DangerousContentScanner

Interface: DangerousContentScanner ​

Interface for file type specific scanners

Properties ​

supportedTypes ​

ts
readonly supportedTypes: readonly DetectedFileType[];

File types this scanner can handle

Methods ​

canHandle() ​

ts
canHandle(fileType): boolean;

Check if this scanner can handle the given file type

Parameters ​

ParameterType
fileTypeDetectedFileType

Returns ​

boolean


scan() ​

ts
scan(data, fileType): ScanResult;

Scan the file for dangerous content

Parameters ​

ParameterType
dataUint8Array
fileTypeDetectedFileType

Returns ​

ScanResult

Released under the MIT License.