Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LetoDMS download file problem, doc, xls. jpg
#1
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.
Reply
#2
(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).

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.

any solution??
Reply
#3
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
Reply
#4
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
Reply
#5
hi everyone i will report this to matteo today

to check this out thanks

LetoDMS Team
Reply
#6
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?
Reply
#7
(06-17-2010, 03:36 PM)matteo lucarelli Wrote: 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?

Hi There,
The problem is with the file download, I haven't tried file preview inside the browser yet.

Thanks
Reply
#8
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.
Reply
#9
(06-18-2010, 09:07 PM)matteo lucarelli Wrote: 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.

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.
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.

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.
Reply
#10
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)