ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
FilenameSanitizerPreProcessor.php
Go to the documentation of this file.
1 <?php
2 
20 
25 
36 {
40  public function process(FileStream $stream, Metadata $metadata): ProcessingStatus
41  {
42  $filename = $metadata->getFilename();
43 
44  // remove some special characters
46 
47  $metadata->setFilename(Util::normalizeRelativePath($filename));
48 
49  return new ProcessingStatus(ProcessingStatus::OK, 'Filename changed');
50  }
51 }
setFilename(string $filename)
Overwrite the current filename.
Definition: Metadata.php:73
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:60
static sanitizeFileName(string $filename)
Definition: Util.php:36
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$filename
Definition: buildRTE.php:78
Interface FileStream.
Definition: FileStream.php:33