Posts: 6
Threads: 2
Joined: Apr 2010
Reputation:
0
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.
Posts: 4
Threads: 0
Joined: Jun 2010
Reputation:
0
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
Posts: 4
Threads: 0
Joined: Jun 2010
Reputation:
0
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
Posts: 297
Threads: 55
Joined: Apr 2025
Reputation:
0
hi everyone i will report this to matteo today
to check this out thanks
LetoDMS Team
Posts: 181
Threads: 23
Joined: Feb 2010
Reputation:
0
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?
Posts: 181
Threads: 23
Joined: Feb 2010
Reputation:
0
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.
Posts: 1
Threads: 0
Joined: Jun 2010
Reputation:
0
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