Skip to content

TypeScript API / laikacms/file-sanitizer / canSanitize

Function: canSanitize() ​

ts
function canSanitize(data): object;

Check if a file can be sanitized (without actually sanitizing it) Useful for validation before upload

Parameters ​

ParameterType
dataUint8Array

Returns ​

object

canSanitize ​

ts
canSanitize: boolean;

detectedType ​

ts
detectedType: DetectedFileType;

reason? ​

ts
optional reason?: string;

Released under the MIT License.