19declare(strict_types=1);
49 return $this->delivery;
54 return $this->legacy_delivery;
60 Disposition $disposition,
62 int $valid_for_at_least_hours
65 $valid_for_at_least_hours++;
66 $until = new \DateTimeImmutable(
67 (
new \DateTimeImmutable(
"now +$valid_for_at_least_hours hours"))->format(
'Y-m-d H:00')
70 $token = $this->data_signer->getSignedStreamToken(
82 if (isset($pathinfo[
'extension']) && $pathinfo[
'extension'] !==
'') {
83 $suffix =
'.' . $pathinfo[
'extension'];
93 return $this->base_uri ?? $this->base_uri = rtrim(
94 $this->
http->request()->getUri()->getScheme()
95 .
'://' . $this->http->request()->getUri()->getHost()
96 . ($this->http->request()->getUri()->getPort() ?
':' . $this->http->request()->getUri()->getPort() :
'')
97 . dirname($this->
http->request()->getUri()->getPath()),
The scope of this class is split ilias-conform URI's into components.
buildTokenURL(FileStream $stream, string $filename, Disposition $disposition, int $user_id, int $valid_for_at_least_hours)
__construct(private StreamDelivery $delivery, private LegacyDelivery $legacy_delivery, private DataSigner $data_signer, private \ILIAS\HTTP\Services $http)
The base interface for all filesystem streams.
static http()
Fetches the global http state from ILIAS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.