19 declare(strict_types=1);
36 private \ILIAS\HTTP\Services
$http;
50 public function run(): void
52 $revision = $this->getRevision();
53 $filename_with_extension = $this->file_name ?? $revision->getInformation()->getTitle();
54 $extension = pathinfo($filename_with_extension, PATHINFO_EXTENSION);
55 $file_name_for_consumer = $this->file_name_policy->prepareFileNameForConsumer($filename_with_extension);
59 if ($this->file_name_policy->isValidExtension($extension)) {
72 . $file_name_for_consumer
75 $revision = $this->stream_access->populateRevision($revision);
80 $this->
http->sendResponse();
__construct(\ILIAS\HTTP\Services $http, StorableResource $resource, StreamAccess $stream_access, FileNamePolicy $file_name_policy)
Interface StorageResource.
ILIAS HTTP Services $http
Class ChatMainBarProvider .
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
run()
This runs the actual DeliveryConsumer.
StorableResource $resource
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface FileNamePolicy.
StreamAccess $stream_access
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const NON_VALID_EXTENSION_MIME
static http()
Fetches the global http state from ILIAS.
const APPLICATION__OCTET_STREAM
__construct(Container $dic, ilPlugin $plugin)
Interface DeliveryConsumer.
FileNamePolicy $file_name_policy