Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LetoDMS download file problem, doc, xls. jpg
#11
Ok,
in both solutions the node is inside the "header" section sent to the browser.
pngythai and dting: please let us know if some of this solutions works for you to consider the fix for the next release.

If none works: I need to know in wich client flatform (SO/Browser) are you experimentig the bug to try to reproduce it.
Reply
#12
(06-21-2010, 08:29 PM)matteo lucarelli Wrote: Ok,
in both solutions the node is inside the "header" section sent to the browser.
pngythai and dting: please let us know if some of this solutions works for you to consider the fix for the next release.

If none works: I need to know in wich client flatform (SO/Browser) are you experimentig the bug to try to reproduce it.

Sorry for the delay in getting back on this, I've been out of the office for a few days. I tried the solution provided by nmf and it solved the problem. Although it takes me to a blank page when the download link is clicked. However this is a minor issue, At least I can now download and view the word documents. I'll test other file formats as I upload them to the dms and if I get problems I'll re-post here.

Many Thanks
(06-21-2010, 08:29 PM)matteo lucarelli Wrote: Ok,
in both solutions the node is inside the "header" section sent to the browser.
pngythai and dting: please let us know if some of this solutions works for you to consider the fix for the next release.

If none works: I need to know in wich client flatform (SO/Browser) are you experimentig the bug to try to reproduce it.

Sorry for the delay in getting back on this, I've been out of the office for a few days. I tried the solution provided by nmf and it solved the problem. Although it takes me to a blank page when the download link is clicked. However this is a minor issue, At least I can now download and view the word documents. I'll test other file formats as I upload them to the dms and if I get problems I'll re-post here.

Many Thanks
Reply
#13
This fix worked for me, but I had to add the line ...
header("Content-Type: " . $content->getMimeType());
after
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
to get Firefox 3.6.3 to select the correct application.

Ian T.




(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

I forgot to mention - "View online" gives me a blank page with *.png files.

(06-25-2010, 01:02 PM)bulkoboy Wrote: This fix worked for me, but I had to add the line ...
header("Content-Type: " . $content->getMimeType());
after
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
to get Firefox 3.6.3 to select the correct application.

Ian T.
Reply
#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
#15
Hi!

I am using LetoDMS-3.0.0-RC3 and I'm having the same problems too.
I have tried the proposed solutions without success, someone has solved this problem?

Im using Microsoft xp and firefox 4.0, IE8

Best Regards!
Reply
#16
I solved the problem in the version 3.0.0-RC3 by changing op/op.Download.php approximately lline 61 to 71 this way:

/***Original***/
//header("Content-Type: application/force-download; name=\"" . mydmsDecodeString($content->getOriginalFileName()) . "\"");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($dms->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($dms->contentDir . $content->getPath());


*** change to ***

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

********************************************************

I hope that help to someone.

Best Regards!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)