ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
FilenameSanitizerPreProcessor.php
Go to the documentation of this file.
1 <?php
2 
20 
25 
36 {
37 
41  public function process(FileStream $stream, Metadata $metadata)
42  {
43  $filename = $metadata->getFilename();
44 
45  // remove some special characters
47 
48  $metadata->setFilename(Util::normalizeRelativePath($filename));
49 
50  return new ProcessingStatus(ProcessingStatus::OK, 'Filename changed');
51  }
52 }
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:73
static sanitizeFileName(string $filename)
Definition: Util.php:34
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$filename
Definition: buildRTE.php:89
setFilename($filename)
Overwrite the current filename.
Definition: Metadata.php:87
Interface FileStream The base interface for all filesystem streams.
Definition: FileStream.php:17