TypeScript API / laikacms/file-sanitizer / GifSanitizer
Class: GifSanitizer
Interface for file type specific sanitizers
Implements
Constructors
Constructor
ts
new GifSanitizer(): GifSanitizer;Returns
GifSanitizer
Properties
fileType
ts
readonly fileType: "gif";The file type this sanitizer handles
Implementation of
Methods
canHandle()
ts
canHandle(data): boolean;Check if this sanitizer can handle the given data
Parameters
| Parameter | Type |
|---|---|
data | Uint8Array |
Returns
boolean
Implementation of
sanitize()
ts
sanitize(data, _options): Promise<SanitizeResult>;Sanitize the file data
Parameters
| Parameter | Type |
|---|---|
data | Uint8Array |
_options | SanitizeOptions |
Returns
Promise<SanitizeResult>
Throws
if the file is corrupted