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
| Parameter | Type |
|---|---|
data | Uint8Array |
Returns
object
canSanitize
ts
canSanitize: boolean;detectedType
ts
detectedType: DetectedFileType;reason?
ts
optional reason?: string;