19 declare(strict_types=1);
38 Disposition::ATTACHMENT,
45 public function inline(
63 ?
string $download_file_name =
null,
64 ?
string $mime_type =
null,
65 ?
bool $delete_file =
false 68 $this->
http->response(),
70 $mime_type ?? mime_content_type($path_to_file),
71 $download_file_name ?? basename($path_to_file),
74 $r = $this->response_builder->buildForStream(
75 $this->
http->request(),
setGeneralHeaders(ResponseInterface $r, string $uri, string $mime_type, string $file_name, Disposition $disposition=Disposition::INLINE)
attached(string $path_to_file, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
saveAndClose(ResponseInterface $r, ?string $path_to_delete=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
deliver(string $path_to_file, Disposition $disposition, ?string $download_file_name=null, ?string $mime_type=null, ?bool $delete_file=false)
static ofResource($resource)
Wraps an already created resource with the stream abstraction.
static http()
Fetches the global http state from ILIAS.
string $download_file_name