3declare(strict_types=1);
70 if ($path_to_file === self::DIRECT_PHP_OUTPUT) {
85 if (!$this->
delivery()->supportsStreaming()) {
102 !$this->
delivery()->doesFileExists($this->path_to_file)
103 && $this->path_to_file !== self::DIRECT_PHP_OUTPUT
107 $this->
http->sendResponse();
171 $this->
http->close();
183 $finfo = finfo_open(FILEINFO_MIME_TYPE);
205 if (self::$delivery_type_static) {
211 if (function_exists(
'apache_get_modules')
212 && in_array(
'mod_xsendfile', apache_get_modules(),
true)
217 if (is_file(
'./Services/FileDelivery/classes/override.php')) {
218 $override_delivery_type =
false;
220 require_once(
'./Services/FileDelivery/classes/override.php');
221 if ($override_delivery_type) {
226 if ((!$ilRuntime->isFPM() && !$ilRuntime->isHHVM())
448 $ob_get_contents = ob_get_contents();
449 if ($ob_get_contents) {
455 }
catch (\Throwable $t) {
499 foreach ($umlaut_mapping as $src => $tgt) {
500 $original_filename = str_replace($src, $tgt, $original_filename);
503 $ascii_filename = htmlentities($original_filename, ENT_NOQUOTES,
'UTF-8');
509 '/[:\x5c\/\*\?\"<>\|]/',
static string $delivery_type_static
setSendMimeType(bool $send_mime_type)
FileDeliveryTypeFactory $factory
cleanDownloadFileName()
Converts the filename to ASCII.
string $download_file_name
bool $convert_file_name_to_asci
setExitAfter(bool $exit_after)
setConvertFileNameToAsci(bool $convert_file_name_to_asci)
setShowLastModified(bool $show_last_modified)
static setDEBUG(bool $DEBUG)
setMimeType(string $mime_type)
setDisposition(string $disposition)
__construct(string $path_to_file, Services $http)
setHasContext(bool $has_context)
setHashFilename(bool $hash_filename)
isConvertFileNameToAsci()
setDeliveryType(string $delivery_type)
setPathToFile(string $path_to_file)
determineDownloadFileName()
static returnASCIIFileName(string $original_filename)
Converts a UTF-8 filename to ASCII.
setDeleteFile(bool $delete_file)
setDownloadFileName(string $download_file_name)
Class FileDeliveryTypeFactory.
static lookupMimeType(string $path_to_file, string $fallback=self::APPLICATION__OCTET_STREAM, bool $a_external=false)
static getType()
Get context type.
Interface ilFileDeliveryType.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
Class ChatMainBarProvider \MainMenu\Provider.