2013-10-07 20:45:09 +02:00
|
|
|
<?php
|
|
|
|
if (!empty($this->context->transport->errorMessage))
|
|
|
|
{
|
|
|
|
\Chibi\HeadersHelper::set('Content-Type', 'text/plain; charset=utf-8');
|
|
|
|
echo $this->context->transport->errorMessage;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2013-10-13 13:37:18 +02:00
|
|
|
if (isset($this->context->transport->customFileName))
|
|
|
|
{
|
|
|
|
\Chibi\HeadersHelper::set(
|
|
|
|
'Content-Disposition',
|
2013-10-13 22:54:16 +02:00
|
|
|
'inline; filename="' . $this->context->transport->customFileName . '"');
|
2013-10-13 13:37:18 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
\Chibi\HeadersHelper::set(
|
|
|
|
'Content-Type',
|
|
|
|
$this->context->transport->mimeType);
|
|
|
|
|
2013-10-07 20:45:09 +02:00
|
|
|
readfile($this->context->transport->filePath);
|
|
|
|
flush();
|
|
|
|
}
|