Skip to content
Snippets Groups Projects
Unverified Commit 4e5b75b1 authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4542 from aydreeihn/issue/session-attachments

File Disposition
parents bc7b5a4d 0c6e9acc
No related branches found
No related tags found
No related merge requests found
......@@ -258,7 +258,9 @@ class AttachmentFile extends VerySimpleModel {
$type = $this->getType() ?: 'application/octet-stream';
if (isset($_REQUEST['overridetype']))
$type = $_REQUEST['overridetype'];
Http::download($name ?: $this->getName(), $type, null, 'inline');
elseif (!strcasecmp($disposition, 'attachment'))
$type = 'application/octet-stream';
Http::download($name ?: $this->getName(), $type, null, $disposition);
header('Content-Length: '.$this->getSize());
$this->sendData(false);
exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment