19declare(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();
const APPLICATION__OCTET_STREAM
StreamAccess $stream_access
FileNamePolicy $file_name_policy
StorableResource $resource
const NON_VALID_EXTENSION_MIME
run()
This runs the actual DeliveryConsumer.
__construct(\ILIAS\HTTP\Services $http, StorableResource $resource, StreamAccess $stream_access, FileNamePolicy $file_name_policy)
ILIAS HTTP Services $http
Interface DeliveryConsumer.
Interface FileNamePolicy.
Interface StorageResource.
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.