![]() |
LetoDMS download file problem, doc, xls. jpg - Printable Version +- LetoDMS Community Forum (https://community.letodms.com) +-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4) +--- Forum: Bugs/Errors (https://community.letodms.com/forumdisplay.php?fid=11) +--- Thread: LetoDMS download file problem, doc, xls. jpg (/showthread.php?tid=61) Pages:
1
2
|
LetoDMS download file problem, doc, xls. jpg - dting - 04-24-2010 I am using LetoDMS 1.8 and found that various file format can be uploaded to the system alright, (I checked the content folder and can open the file without any problem). However, we I downloaded the file with LetoDMS, I have problem opening files type: doc, jpg, png, xls (where Excel have an error message saying " the file you are trying to open, "abc.xls", is in a different format specified by the file extension. Verify that the file is not corrupted or is from a trusted source before opening the file. Do you want to open the file now?"), and when I choose open the file, the is not a readable format. .txt and .pdf is OK. RE: LetoDMS download file problem, doc, xls. jpg - diegovgd - 06-03-2010 (04-24-2010, 11:43 PM)dting Wrote: I am using LetoDMS 1.8 and found that various file format can be uploaded to the system alright, (I checked the content folder and can open the file without any problem). any solution?? RE: LetoDMS download file problem, doc, xls. jpg - Elias Sajo - 06-12-2010 Hi, Do you have the latest 1.8.2 version installed? I have no issues with this version and the files you mentioned. If you continue to experience issues download the file to your desktop and open that and the original file with Notepad++ for example to see how is the file changed. Elias RE: LetoDMS download file problem, doc, xls. jpg - pengythai - 06-17-2010 I'm having the same problems too. Downloading the file causes word to try to convert the document from a text file. Running A Diff against the two files shows that 4 bytes are being added to the start of the file. Hex: 0D0A0D0A - 2 line feeds and Carriage returns. PDF Files are not affected. I've not looked at other formats yet as I mainly use word documents and PDFs I'm running version 1.8.2 on Ubuntu Server 10.04. Hope this info helps Andrew RE: LetoDMS download file problem, doc, xls. jpg - administrator - 06-17-2010 hi everyone i will report this to matteo today to check this out thanks LetoDMS Team RE: LetoDMS download file problem, doc, xls. jpg - matteo lucarelli - 06-17-2010 Hi, I'm not experimenting this problem, or at least I've not understand exacly. There is problem with the file download or with the file preview inside the browser? RE: LetoDMS download file problem, doc, xls. jpg - pengythai - 06-17-2010 (06-17-2010, 03:36 PM)matteo lucarelli Wrote: Hi, Hi There, The problem is with the file download, I haven't tried file preview inside the browser yet. Thanks RE: LetoDMS download file problem, doc, xls. jpg - matteo lucarelli - 06-18-2010 This should solve your problem. You must uncomment: header("Content-Type: " . $content->getMimeType()); around the line 70 in the file op/op.Download.php this set the file type in the header sent to the browser. Next release will fix it but meanwhile you can edit the file by hand. RE: LetoDMS download file problem, doc, xls. jpg - pengythai - 06-21-2010 (06-18-2010, 09:07 PM)matteo lucarelli Wrote: This should solve your problem. Thanks for the information. I uncommented that line which was at line 69 in my op.Download.php file I then tested it didn't fix the issue, so then I also uncommented the same line at lines 113 & 137 as well. However it still doesn't work. (06-18-2010, 09:07 PM)matteo lucarelli Wrote: This should solve your problem. Thanks for the information. I uncommented that line which was at line 69 in my op.Download.php file I then tested it didn't fix the issue, so then I also uncommented the same line at lines 113 & 137 as well. However it still doesn't work. RE: LetoDMS download file problem, doc, xls. jpg - nmf - 06-21-2010 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 |