Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LetoDMS download file problem, doc, xls. jpg
#14
(06-21-2010, 05:06 PM)nmf Wrote: I also had got this problem.
Luckily, I solved it by changing below script:

****** original **********
header("Content-Type: application/force-download; name=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($settings->_contentDir . $content->getPath() ));
header("Content-Disposition: attachment; filename=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\"");
//header("Expires: 0");
//header("Content-Type: " . $content->getMimeType());
//header("Cache-Control: no-cache, must-revalidate");
header("Cache-Control: must-revalidate");
//header("Pragma: no-cache");

readfile($settings->_contentDir . $content->getPath());


********* change to ****************
header('Content-Description: File Transfer');

header("Content-Type: application/application/octet-stream; name=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\"");

header("Content-Disposition: attachment; filename=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\"");
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header("Content-Length: " . filesize($settings->_contentDir . $content->getPath() ));
ob_clean();
flush();
readfile($settings->_contentDir . $content->getPath());
***********************************

you may try it

correct solution in my case
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)