3declare(strict_types=1);
32 use HeaderBasedDeliveryHelper;
46 $this->httpService = $httpState;
55 return is_readable($path_to_file);
62 public function prepare(
string $path_to_file): bool
72 public function deliver(
string $path_to_file,
bool $file_marked_to_delete): void
74 $delivery =
function () use ($path_to_file):
void {
75 $response = $this->httpService->response()
76 ->withHeader(self::X_SENDFILE, realpath($path_to_file));
77 $this->httpService->saveResponse(
$response);
78 $this->httpService->sendResponse();
81 if ($file_marked_to_delete) {
82 $this->sendFileUnbufferedUsingHeaders($delivery);
121 return unlink($path_to_file);
const X_SENDFILE_TEMPORARY
deliver(string $path_to_file, bool $file_marked_to_delete)
void
prepare(string $path_to_file)
bool
handleFileDeletion(string $path_to_file)
bool
doesFileExists(string $path_to_file)
@inheritDoc
__construct(Services $httpState)
PHP constructor.
ILIAS HTTP Services $httpService
supportsAttachmentDelivery()
Interface ilFileDeliveryType.