ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\MetaData\Repository\Validation\Processor\PreProcessor Interface Reference

Class PreProcessor. More...

+ Inheritance diagram for ILIAS\MetaData\Repository\Validation\Processor\PreProcessor:
+ Collaboration diagram for ILIAS\MetaData\Repository\Validation\Processor\PreProcessor:

Public Member Functions

 process (FileStream $stream, Metadata $metadata)
 This method gets invoked by the file upload service to process the file with the help of the processor. More...
 

Detailed Description

Class PreProcessor.

The preprocessor interface defines the required methods for the preprocessors which are used to process the file before it is moved.

Author
Nicolas Schäfli ns@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Since
5.3
Version
1.0

Definition at line 37 of file PreProcessor.php.

Member Function Documentation

◆ process()

ILIAS\MetaData\Repository\Validation\Processor\PreProcessor::process ( FileStream  $stream,
Metadata  $metadata 
)

This method gets invoked by the file upload service to process the file with the help of the processor.

If the return value is REJECTED, no further invocations of processors are done for the rejected file.

If the processor fails or returns an unexpected value, the file gets automatically rejected because the file could be dangerous to ILIAS.

Parameters
FileStream$streamThe stream of the file.
Metadata$metadataThe meta data of the uploaded file.
Returns
ProcessingStatus The new status of the file.

Implemented in ILIAS\MetaData\Repository\Validation\Processor\SVGBlacklistPreProcessor, ILIAS\MetaData\Repository\Validation\Processor\WhitelistMimeTypePreProcessor, ILIAS\MetaData\Repository\Validation\Processor\BlacklistMimeTypePreProcessor, ILIAS\MetaData\Repository\Validation\Processor\SVGWhitelistPreProcessor, ILIAS\MetaData\Repository\Validation\Processor\WhitelistExtensionPreProcessor, ILIAS\MetaData\Repository\Validation\Processor\BlacklistFileHeaderPreProcessor, ILIAS\MetaData\Repository\Validation\Processor\WhitelistFileHeaderPreProcessor, ILIAS\MetaData\Repository\Validation\Processor\AbstractRecursiveZipPreProcessor, and ILIAS\MetaData\Repository\Validation\Processor\FilenameSanitizerPreProcessor.


The documentation for this interface was generated from the following file: