Validator

File validator service
Methods Summary
public
# __construct( array $mediaTypes = NULL, array $extensions = NULL, bool $disable = false )
public
# validate( Omeka\File\TempFile $tempFile , Omeka\Stdlib\ErrorStore $errorStore = NULL )
Validate a file. Validates a file against the media type and extension whitelists. Prior to calling this method the file must be saved to `TempFile::$tempPath` and the file's original filename must be saved to `TempFile::$sourceName`. Pass the $errorStore object if an error should raise an API validation error.
Properties Summary
protected array $mediaTypes
# NULL
protected array $extensions
# NULL
protected bool $disable
# false