Files
2026-07-13 12:33:44 +08:00

1.3 KiB

@redeye/parser-core

@redeye/parser-core

Table of contents

Enumerations

Interfaces

Type Aliases

Type Aliases

UploadValidation

Ƭ UploadValidation: { validate: None | Parser } | { acceptedExtensions: string[] ; validate: FileExtensions }

The validation mode for the upload form

Example

// No validation, allow uploading any folder or files
validate = { validate: ValidationMode.None };
// Only allow files with specific file extensions
validate = { validate: ValidationMode.FileExtensions, acceptedExtensions: ['txt', 'png', 'jpg'] };
// The parser has implemented the 'validate-files' command and will validate the folder of files
validate = { validate: ValidationMode.Parser };

Defined in

upload-form.ts:76