34 use IsMimeTypeOrExtension;
39 abstract protected function checkPath(
string $path) : bool;
49 $zip_file_path = $stream->getMetadata(
'uri');
50 $zip = new \ZipArchive();
51 $zip->open($zip_file_path);
53 for (
$i = 0;
$i < $zip->numFiles;
$i++) {
54 $original_path = $zip->getNameIndex(
$i);
60 }
catch (\Exception
$e) {
74 return $this->isMimeTypeOrExtension(
77 [
'application/zip',
'application/x-zip-compressed']
An exception for terminatinating execution or to throw for unit testing.
const REJECTED
Upload got rejected by a processor.
Class InsecureFilenameSanitizerPreProcessor.
isFileAZip(Metadata $metadata)
process(FileStream $stream, Metadata $metadata)
This method gets invoked by the file upload service to process the file with the help of the processo...
Interface FileStream The base interface for all filesystem streams.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...