mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
Content-Length is now set in sendFile()
This commit is contained in:
parent
3b0eafd5aa
commit
8b2e8e0c0d
|
@ -54,7 +54,6 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
|||
if(null === $this->callHook('version')) {
|
||||
if(file_exists($dms->contentDir . $content->getPath())) {
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-Length: " . filesize($dms->contentDir . $content->getPath() ));
|
||||
$efilename = rawurlencode($content->getOriginalFileName());
|
||||
header("Content-Disposition: attachment; filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename);
|
||||
header("Content-Type: " . $content->getMimeType());
|
||||
|
|
|
@ -41,7 +41,6 @@ class SeedDMS_Controller_ExtensionMgr extends SeedDMS_Controller_Common {
|
|||
if(null === $this->callHook('download')) {
|
||||
if(file_exists($filename)) {
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-Length: " . filesize($filename));
|
||||
header("Content-Disposition: attachment; filename=\"" . utf8_basename($filename) . "\"; filename*=UTF-8''".utf8_basename($filename));
|
||||
header("Content-Type: application/zip");
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
|
|
@ -56,7 +56,6 @@ class SeedDMS_Controller_ViewOnline extends SeedDMS_Controller_Common {
|
|||
} else {
|
||||
header("Content-Disposition: filename=\"" . $efilename . "\"; filename*=UTF-8''".$efilename);
|
||||
}
|
||||
header("Content-Length: " . filesize($dms->contentDir . $content->getPath()));
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
sendFile($dms->contentDir.$content->getPath());
|
||||
|
|
Loading…
Reference in New Issue
Block a user