Excel attachment on Knowledge Article opens as a PDF from the Portal


Description

When an Excel file is attached to a Knowledge Article it will open up as a PDF in the new tab in portal. There is an option to download but it downloads as a PDF. When viewing the same article with the same attachment with in the platform, either from the Knowledge Homepage or from the edit article area, the attachment will download as an Excel upon clicking the link. 

Release or Environment

Document Viewer plugin is introduced in Madrid.

Cause

Document viewer plugin (com.snc.documentviewer)

Resolution

Document Viewer is enabled on the instance and so the xlsx is downloading a pdf on portal. See the documentation below


https://docs.servicenow.com/csh?topicname=Documentviewer.html&version=latest

 

https://docs.servicenow.com/csh?topicname=disable-doc-viewer.html&version=latest



If you wish to have old behavior on portal, document viewer can be disabled by following below steps-

1) Go to sys_properties.list
2) Create a new property - com.snc.documentviewer.enable_document_viewer (if it does not exist already) of type true/false
3) set it to "false".
4) Save it and clear the cache