8 require_once(
'./Services/FileDelivery/interfaces/int.ilFileDeliveryType.php');
36 $this->httpService = $httpState;
45 return is_readable($path_to_file);
62 public function deliver($path_to_file, $file_marked_to_delete)
64 $delivery =
function () use ($path_to_file) {
65 $response = $this->httpService->response()
66 ->withHeader(self::X_SENDFILE, realpath($path_to_file));
67 $this->httpService->saveResponse(
$response);
68 $this->httpService->sendResponse();
71 if ($file_marked_to_delete) {
72 $this->sendFileUnbufferedUsingHeaders($delivery);
113 unlink($path_to_file);
Interface GlobalHttpState.
supportsAttachmentDelivery()
bool
supportsInlineDelivery()
bool
Interface ilFileDeliveryType.
handleFileDeletion($path_to_file)
bool
prepare($path_to_file)
bool
const X_SENDFILE_TEMPORARY
deliver($path_to_file, $file_marked_to_delete)
absolute path to fileThis is needed at this point for header-based delivery methodsbool ...
__construct(GlobalHttpState $httpState)
PHP constructor.
doesFileExists($path_to_file)