ILIAS  release_8 Revision v8.24
FilenameSanitizerPreProcessor.php
Go to the documentation of this file.
1<?php
2
20
24use League\Flysystem\Util;
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}
$filename
Definition: buildRTE.php:78
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:60
setFilename(string $filename)
Overwrite the current filename.
Definition: Metadata.php:73
process(FileStream $stream, Metadata $metadata)
@inheritDoc
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...