3 declare(strict_types=1);
56 ?
string $download_file_name = null,
57 ?
string $mime_type = null,
58 bool $delete_file =
false 62 if ($download_file_name !== null) {
63 $obj->setDownloadFileName($download_file_name);
65 if ($mime_type !== null) {
66 $obj->setMimeType($mime_type);
68 $obj->setDisposition(self::DISP_ATTACHMENT);
69 $obj->setDeleteFile($delete_file);
75 ?
string $download_file_name = null
78 if ($download_file_name !== null) {
79 $obj->setDownloadFileName($download_file_name);
81 $obj->setDisposition(self::DISP_INLINE);
87 ?
string $download_file_name = null
90 if ($download_file_name !== null) {
91 $obj->setDownloadFileName($download_file_name);
93 $obj->setDisposition(self::DISP_INLINE);
99 return Delivery::returnASCIIFileName($original_filename);
120 ?
string $a_filename = null,
121 ?
string $a_mime = null,
122 ?
bool $isInline =
false,
123 ?
bool $removeAfterDelivery =
false,
124 ?
bool $a_exit_after =
true 128 if (!file_exists($a_file)) {
131 $delivery =
new Delivery($a_file, $DIC->http());
139 if ($a_mime !== null && $a_mime !==
'') {
setConvertFileNameToAsci(bool $convert_file_name_to_asci)
setDeleteFile(bool $delete_file)
setMimeType(string $mime_type)
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)
trait HttpServiceAware
Trait HttpServiceAware.
const DELIVERY_METHOD_PHP_CHUNKED
const DELIVERY_METHOD_XACCEL