• Downloading email attachments fails

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #50040  by tbclark3
 
I uploaded about 4000 individual eml files to an openkm installation, and they appear to have been parsed and indexed correctly. When I click on one of them with an attachment, and look at the preview window, I correctly see the message contents and a list of attachments. However, when I click on any one of the attachments, it starts a download but never finishes. Every time, the browser gets almost to the end of the download, says that the download failed, and starts over.

However, if I copy the "incomplete" file just before the browser fails and compare it to the version in the openkm repository, it is identical. Also, if I right click and copy the attachment to another location within openkm, I can preview it or download it successfully. Thus the problem seems to be that the browser thinks the file is bigger than it actually is. The difference is not constant, but is usually not very much.

I would be happy to further troubleshoot this problem, but I'm not sure where to start.
 #50042  by tbclark3
 
Additional info:

After spending some time analyzing HTTP headers, it is clear that the openkm server is returning an incorrect Content-Length. In every case it is bigger than the actual document.
 #50050  by jllort
 
What is the real content lenght of these attachments ?
Can you share some eml for testing in our development environment.
Finally what OpenKM version are you using?
 #50051  by tbclark3
 
I am using version 6.3.9 in Docker.

I created the attached email and uploaded it to my openkm instance. Both of the attachments fail to download because the server provides the wrong content-length. I had to rename the attached email from flowermail.eml to flowermail.eml.pdf because your server doesn't allow upload of .eml extensions. In order to recreate the problem, you will obviously have to rename it to flowermail.eml before uploading it to an openkm instance.

It doesn't make any difference what type of file the attachment is. And, again, downloading the entire email works. It only fails when downloading individual attachments from the Preview tab.

Attachment: flower1.jpeg
Actual length: 21846
Header Content-Length provided by server: 29936

Attachment: flower2.jpg
Actual length: 19566
Header Content-Length provided by server: 26812
Attachments
(57.36 KiB) Downloaded 157 times

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.