19 declare(strict_types=1);
60 ?
string $download_file_name = null,
61 ?
string $mime_type = null,
62 bool $delete_file =
false 66 if ($download_file_name !== null) {
67 $obj->setDownloadFileName($download_file_name);
69 if ($mime_type !== null) {
70 $obj->setMimeType($mime_type);
72 $obj->setDisposition(self::DISP_ATTACHMENT);
73 $obj->setDeleteFile($delete_file);
79 ?
string $download_file_name = null
82 if ($download_file_name !== null) {
83 $obj->setDownloadFileName($download_file_name);
85 $obj->setDisposition(self::DISP_INLINE);
91 ?
string $download_file_name = null
94 if ($download_file_name !== null) {
95 $obj->setDownloadFileName($download_file_name);
97 $obj->setDisposition(self::DISP_INLINE);
103 return Delivery::returnASCIIFileName($original_filename);
114 public function __call(
string $name, array $arguments)
124 ?
string $a_filename = null,
125 ?
string $a_mime = null,
126 ?
bool $isInline =
false,
127 ?
bool $removeAfterDelivery =
false,
128 ?
bool $a_exit_after =
true 132 if (!file_exists($a_file)) {
135 $delivery =
new Delivery($a_file, $DIC->http());
143 if ($a_mime !== null && $a_mime !==
'') {
setConvertFileNameToAsci(bool $convert_file_name_to_asci)
setDeleteFile(bool $delete_file)
setMimeType(string $mime_type)
trait HttpServiceAware
Trait HttpServiceAware.
Interface ilFileDeliveryService.
__construct(string $file_path)
ilFileDelivery constructor.
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
static returnASCIIFileName(string $original_filename)
Converts a UTF-8 filename to ASCII.
static deliverFileInline(string $path_to_file, ?string $download_file_name=null)
__call(string $name, array $arguments)
Workaround because legacy components try to call methods which are moved to the Deliver class...
setDisposition(string $disposition)
static http()
Fetches the global http state from ILIAS.
static deliverFileAttached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, bool $delete_file=false)
setExitAfter(bool $exit_after)
const DELIVERY_METHOD_PHP
setDownloadFileName(string $download_file_name)
const DELIVERY_METHOD_XSENDFILE
static streamVideoInline(string $path_to_file, ?string $download_file_name=null)
const DELIVERY_METHOD_PHP_CHUNKED
const DELIVERY_METHOD_XACCEL