ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
FilenameSanitizerPreProcessor.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28
30{
31 public function process(FileStream $stream, Metadata $metadata): ProcessingStatus
32 {
33 $metadata->setFilename(Util::sanitizeFileName($metadata->getFilename()));
34 return new ProcessingStatus(ProcessingStatus::OK, 'Filename changed');
35 }
36}
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:76
setFilename(string $filename)
Overwrite the current filename.
Definition: Metadata.php:89
process(FileStream $stream, Metadata $metadata)
This method gets invoked by the file upload service to process the file with the help of the processo...
static sanitizeFileName(string $filename)
Definition: Util.php:48
The base interface for all filesystem streams.
Definition: FileStream.php:32
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...