ILIAS  release_7 Revision v7.30-3-g800a261c036
FilenameSanitizerPreProcessor.php
Go to the documentation of this file.
1<?php
2
20
24use League\Flysystem\Util;
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}
$filename
Definition: buildRTE.php:89
An exception for terminatinating execution or to throw for unit testing.
getFilename()
The filename supplied by the browser.
Definition: Metadata.php:73
setFilename($filename)
Overwrite the current filename.
Definition: Metadata.php:87
process(FileStream $stream, Metadata $metadata)
@inheritDoc
static sanitizeFileName(string $filename)
Definition: Util.php:34
Interface FileStream The base interface for all filesystem streams.
Definition: FileStream.php:18
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...