Send downloads always with content-disposition: attachment header.
This commit is contained in:
parent
516640b0cd
commit
850be91695
@ -205,7 +205,8 @@ class IDF_Views_Download
|
|||||||
$path = $upload->getFullPath();
|
$path = $upload->getFullPath();
|
||||||
$mime = IDF_FileUtil::getMimeType($path);
|
$mime = IDF_FileUtil::getMimeType($path);
|
||||||
$render = new Pluf_HTTP_Response_File($path, $mime[0]);
|
$render = new Pluf_HTTP_Response_File($path, $mime[0]);
|
||||||
$render->headers["Content-MD5"] = $upload->md5;
|
$render->headers['Content-MD5'] = $upload->md5;
|
||||||
|
$render->headers['Content-Disposition'] = 'attachment; filename="'.$upload->file.'"';
|
||||||
return $render;
|
return $render;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user