mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
set Content-Disposition even if file type not in list of online file types
This commit is contained in:
parent
8375b66cbe
commit
05f1919e3c
|
@ -33,8 +33,10 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common {
|
|||
case "version":
|
||||
if(null === $this->callHook('version')) {
|
||||
header("Content-Type: " . $content->getMimeType());
|
||||
$efilename = rawurlencode($content->getOriginalFileName());
|
||||
if (!isset($settings->_viewOnlineFileTypes) || !is_array($settings->_viewOnlineFileTypes) || !in_array(strtolower($content->getFileType()), $settings->_viewOnlineFileTypes)) {
|
||||
$efilename = rawurlencode($content->getOriginalFileName());
|
||||
header("Content-Disposition: attachment; filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename);
|
||||
} else {
|
||||
header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename);
|
||||
}
|
||||
header("Content-Length: " . filesize($dms->contentDir . $content->getPath()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user