cancel
Showing results for 
Search instead for 
Did you mean: 

new version upload breaks preview functionality

pieter_shimanow
Champ in-the-making
Champ in-the-making
I am testing Alfresco v4.2.1. (from the windows 32 installer)

two scenarios:

When uploading a file (pdf) for the first time it is showing a preview allright.
When uploading a new version.
The preview becomes unavailable.

When uploading a file (pdf) for the first time it is showing a preview allright.
When editing off line followed by uploading a new version.
The preview becomes unavailable.

Anyone an idea?

1 REPLY 1

hgindl
Champ in-the-making
Champ in-the-making
i guess you are using firefox, we had the same problem at one of our clients. Have a look at https://support.mozilla.org/en-US/kb/set-how-firefox-handles-different-file-types in your browser and look for Adobe Acrobat Document (application/force-download).

the problem is that through certain circumstances this mimetype mapping gets into your browser, so the mechanism is that if you upload a document for the first time alfresco relies on the document extension (pdf) for simple document formats to guess the mimetyp, but if you upload the document as new version alfresco relies on the mimetype the browser sets in the request, and this i guess is application/force-download in your case, so after the reupload the document cannot be previewed. The problem is that in earlier versions they relied on tika to guess the mimetype which was a quite a performance consuming operation and later optimized it by this "fix" (ALF-10813) that results in the behavior you experiencing now.

as "fix" you could use an other browser than firefox, you can fix the document if you rename the document (change the extension) and then change it back, its also relatively easy to fix it in code if you have the people to do that.

here is also a link to a ticket describing the problem https://issues.alfresco.com/jira/browse/ALF-19688 (ticket is not from me but i have reported the problem too)

kind regards,
hannes